-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
File fetching broken since commit 0c1d2b9 #1371
Comments
@ldaudet Still waiting on a response but there is a PR based on this suggestion now. |
According to fetch spec - Schema fetch:
I'm not sure what's the exact meaning of the spec - Should fetch support file uri or not? Any native speaker or spec expert could help answer it? 🤔 |
Fixed via #1375 👍 |
Hi there!
Thanks a lot for the work on this library! I am using it in a react native app to run code like this: https://snack.expo.dev/@bacon/documentpicker-to-blob (line 24), to grab an image file that I will then upload to the backend.
This worked for the longest time, but after uploading to the latest version of expo, it also uploaded the version of react native, which in turned updated our version of fetch. The problem is that with the latest version of fetch, the fetch of file doesn't work anymore, as described here: facebook/react-native#38625 (comment)
After looking at the code, I realized that the issue was actually do to the work on commit 0c1d2b9 where you added a check for the return code to be between certain values:
When removing this check, everything works just fine with fetching the file, even with the lastest version of fetch, as the fetch of the a file return a status 0.
Would it be possible to either remove the check, or update the code to get a 200 status on successfully fetching a file?
Thanks a lot
The text was updated successfully, but these errors were encountered: