-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Upload to a Graphql (Graphcool) file endpoint #411
Comments
@michaelspeed , I'm wondering if that's because the file is large which exceeds the heap size limitation. How large are the files? Does this happen on both Android and IOS? |
i say we tried with small 3mb and large 10-50mb files. i dont think its about the size, coz for the first one - we get a upload progress, and the rest it just crashes |
@michaelspeed , how does the URI looks like ? |
using react-native-image-picker library |
Hey! I think I've found a workaround: RNFetchBlob.fetch('POST', FILE_ENDPOINT, {
'Accept': 'application/json',
'Content-Type': 'multipart/form-data'
}, [{
name: 'data', // !!!HERE!!! must call "data"
filename: 'anything_you_want',
data: base64data
}]) |
i can confirm the above is working! |
i am facing problems with uploading to graphql(Graphcool) file endpoint.
RN - 0.45.1
react-native-fetch-blob - 0.10.5
snippet - (this one actually shows me the upload progress) -
acutalluy i have tried with a lot of alterations -
the app crashes using the above.
only the snippet version shows me the progress, altought the file upload is complete and i also get a response but there is no file created at the endpoint.
can anyone help me here?
The text was updated successfully, but these errors were encountered: