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

Fix two issues encountered in Edge browser (#507) #508

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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