Image Upload with expo Web

Hello,
In my app I’m trying to upload pictures.
I use apollo-upload-client for uploading a picture
Link: apollo-upload-client/readme.md at master · jaydenseric/apollo-upload-client · GitHub

and in the back-end with graphql yoga I use this approach
Link: graphql-yoga/examples/file-upload at master · dotansimha/graphql-yoga · GitHub

everything works on mobile, but on web I get this error

As the error shows, on the web the compiler expects a blob file, to recall that the uri generated from ImagePicker looks different on the web, in fact instead of having a uri of the form file://path it is in the form of base64, even though it was not specified in the options.

I am creating the file to upload using ReactNative file, in the specific with the following code

const file = new ReactNativeFile({
uri: uriFromCameraRoll,
name: ‘a.jpg’,
type: 'image/Jpeg’

1 Like

Any updates on this?? I am also facing the same issue… I’ve also tried creating a Blob and it still doesn’t quite work… I am stuck with re-formatting the image before saving it to S3.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.