vue-dropzone
vue-dropzone copied to clipboard
TypeError: this.files[t].lastModifiedDate is undefined
Trying to upload the same file twice results in an error. Can be reproduced with the online demo at https://rowanwins.github.io/vue-dropzone/docs/dist/#/demo
TypeError: this.files[t].lastModifiedDate is undefined
reference: https://developer.mozilla.org/en-US/docs/Web/API/File/lastModifiedDate
I dont get that error in Chrome, what browser are you using?
It happens in Safari 13.0.1
Same error in firefox
Big, fat warning on MDN:
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Though present in early draft of the File API spec, this property has been removed from it and is now non-standard. Use File.lastModified instead.
File.lastModified
returns a timestamp, so that's even easier, however the garbage browsers like IE and Safari still don't support it, so the code needs to account for that.