vue-clip
vue-clip copied to clipboard
Height and Width are not working
As you can see the ''Height'' and ''Width'' are undefined. I tried this with jpeg and png files.
Anyone have a solution?
can someone help me !?
When the file is added, a new File object is created from the native file interface object that dropzone passes vue-clip. See here for the event handler: https://github.com/thetutlage/vue-clip/blob/master/src/components/Clip/index.js#L224-L239. See here for the File constructor: https://github.com/thetutlage/vue-clip/blob/master/src/File.js#L5-L20.
If I remember right from my own debugging, I usually see the width & height empty when no dataUrl is returned (large files, unsupported file types, etc), but you show it present here. It may be important to note that the width & height are not updated on progress, just when the file is added.
I had the exact same problem. However, I found a solution. You can check the files[0]._file.width & files[0]._file.height . Those variables holds the data ;)