Skip to content

Conversation

@dannya
Copy link

@dannya dannya commented May 26, 2020

…ermining if a file has loaded, since in my testing, Edge is presenting a File object at this stage, rather than the Blob that Chrome etc are presenting (fixes #507).

  • If createFileProcessorFunction is presented with a file object that is not of type Blob (such as File, as seen in Edge browser), it attempts to iterate over it using forEach as if it were an iterable object, however File objects do not have a forEach method. Resolve this by treating all file object input into this function as though they are a singular, non-iterable object (fixes [HAS PR #508] File not uploading in Edge browser, stalls at "Uploading" stage (no percentage) #507).

  • Fix comment typo.

…ermining if a file has loaded, since in my testing, Edge is presenting a `File` object at this stage, rather than the `Blob` that Chrome etc are presenting (fixes pqina#507).

* If `createFileProcessorFunction` is presented with a file object that is not of type `Blob` (such as `File`, as seen in Edge browser), it attempts to iterate over it using `forEach` as if it were an iterable object, however `File` objects do not have a `forEach` method. Resolve this by treating all file object input into this function as though they are a singular, non-iterable object (fixes pqina#507).

* Fix comment typo.
@dannya
Copy link
Author

dannya commented May 26, 2020

I've npm run test with no change on test success rate (100% before and after these changes.)

@dannya dannya changed the title * Use !isFile() instead of !(state.file instanceof Blob) when det… [HAS PR] Fix two issues encountered in Edge browser (#507) May 26, 2020
@dannya dannya changed the title [HAS PR] Fix two issues encountered in Edge browser (#507) Fix two issues encountered in Edge browser (#507) May 26, 2020
…ince there are no other console.log statements in the project!)
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

Successfully merging this pull request may close these issues.

[HAS PR #508] File not uploading in Edge browser, stalls at "Uploading" stage (no percentage)

1 participant