question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microsoft Edge File object missing lastModified

See original GitHub issue

In version 1.3.0 File objects are converted to FormData improperly in MS Edge.

Recently File checking has been changed to (in https://github.com/therealparmesh/object-to-formdata/commit/bd1b2c6a46da594929f546e7595664631477be37):

 function isFile (value) {
-  return value instanceof File
+  return isBlob(value) &&
+      typeof value.lastModified === 'number' &&
+      typeof value.name === 'string'
 }

But in MS Edge File object doesn’t have lastModified property https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4155006/, instead it has lastModifiedDate of ‘object’ type.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pirannacommented, Mar 24, 2018

@piranna I’m not sure how I feel about using detection. I’m thinking that we should just do some tactical ||s to re-add support for Edge in the meantime.

I agree on that, it would not hurt. On the other hand, since FormData allow to use Blob objects, would be good to check if Edge support them too, so we would not need to worry about Edge or File objects anymore…

0reactions
therealparmeshcommented, Mar 26, 2018

The fix is in. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with date modified for NTUSER.DAT
Is Microsoft aware of an issue with various Windows 10 processes causing the date modified timestamp on the NTUSER.DAT file in unused profiles...
Read more >
About Microsoft edge not starting missing file, C:/Program
NO idea why that started blocking MS edge from launching all the sudden but it did. Perhaps it was the cause for the...
Read more >
Get File by modified date and extension then copy to location
FileInfo object to the Copy-Item cmdlet. I think the cmdlet is probably defaulting to using the .Name property and that is not enough ......
Read more >
Azure File sync: Script to delete the files, which has been ...
We are doing something similar using PowerShell script to find the last modified date of each blob file (as in our case Life...
Read more >
Converting a Blob object into a File, for Ms Edge
A File object is a specific kind of a Blob, it's just missing the two properties: lastModifiedDate and name(file name property).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found