vue-dropzone icon indicating copy to clipboard operation
vue-dropzone copied to clipboard

TypeError: this.files[t].lastModifiedDate is undefined

Open martin-ro opened this issue 5 years ago • 4 comments

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

martin-ro avatar Aug 05 '19 13:08 martin-ro

I dont get that error in Chrome, what browser are you using?

rowanwins avatar Sep 09 '19 11:09 rowanwins

It happens in Safari 13.0.1 image

turbat-bay avatar Oct 03 '19 23:10 turbat-bay

Same error in firefox

fabianmieller avatar Feb 07 '20 23:02 fabianmieller

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.

hackel avatar Feb 27 '20 22:02 hackel