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’