I can't seem to access the width or height keys of my object.
I'm using dropzone.js which has an event for addedFile which returns the file and the first param.
so:
var myDropzone = new Dropzone('#dropzone', {url: '/'});
myDropzone.on('addedFile', function(file) {
console.log(file);
});
The callback works just fine, in my console I see:
As you can see, there's clearly the height & width keys available.
myDropzone.on('addedFile', function(file) {
console.log(file.name); // returns the whole strong
console.log(file.width); // returns undefined
console.log(file['width']); // returns undefined
});
Heres a screenshot:
My question is, why is name available, but not width or height? Is it because they're readonly or something? If that's the case, is it even possible to access it?