-
Notifications
You must be signed in to change notification settings - Fork 743
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
Retry Uploading Files is failing #1080
Comments
Ooh, yeah, because the input stream gets exhausted after it's read once. Yick. I'll tag this as a bug, but I'll be honest, it's probably going to be a while before I can get to this. Would be happy to look at any PRs, but it does seem like the automatic |
One thing I will note for this and all other uploading issues: One strategy we've seen have folks have better long-term success with over GQL-based uploads is uploading the file to another service (such as S3 or even your own backend) and then only sending the URL of the file via GraphQL. This is an article about the web, but it's got useful examples. |
Thanks @designatednerd this is the PR #1086 with the fix that I propose, please take a look |
hey @designatednerd thanks for merging my PR, so do you have any news about the new release? |
Shooting for today, have to do some doc updates and testing first |
This has shipped with 0.24.0! |
Thanks @designatednerd |
Hello Everyone,
I found an issue while using the retry handling for Uploading Files, the problem is that in the retry request call (second request call) the Files Content are not being sent in the Request, the framework is recreating the whole request in every retry call so the InputStream is not retrieving the Data once it has been already read, so in the retry call (second request) the InputStream data is nil.
The
inputStream.hasBytesAvailable
is always returning false in every retry call (after the first call)apollo-ios/Sources/Apollo/MultipartFormData.swift
Line 121 in 9987f92
Maybe a fix could be recreate a new InputStream object every time we are going to create a request.
Thanks
The text was updated successfully, but these errors were encountered: