Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Edge file object missing lastModified #70

Open
TroyWolf opened this issue Dec 19, 2017 · 1 comment
Open

Microsoft Edge file object missing lastModified #70

TroyWolf opened this issue Dec 19, 2017 · 1 comment

Comments

@TroyWolf
Copy link

This is not an issue with socketio-file-upload, but is an issue others may run into when uploading files.

I found that my Microsoft Edge users would end up with files on my server with junk timestamps. In my case, I have a process that rsyncs the files to another location and preserves timestamps. rsync would fail with a message like the one below--substitute your file name.

Time value of %s truncated on receiver.

The issue is that Edge does not follow the spec for the File Object as explained here:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4155006/

In short, the object is missing the "lastModified" property that normally holds the unix time value. In my own code, I was able to account for this by adding this bit of code in my function where I handle each file object:

if (!file.lastModified) { file.lastModified = file.lastModifiedDate.getTime(); }

Arguably, socketio-file-upload client could do this same thing internally.

@sffc
Copy link
Owner

sffc commented Jul 5, 2018

Thanks for the report. Unfortunately I don't have easy access to Microsoft Edge to test this.

Can you send a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants