expo: [ios] expo SDK 39, Invalid Request token when upload image

πŸ› Bug Report

Summary of Issue

Environment - output of expo diagnostics & the platform(s) you’re targeting

image

Reproducible Demo

Steps to Reproduce

Expected Behavior vs Actual Behavior

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (7 by maintainers)

Most upvoted comments

@svaldi - can you point to the commit or PR that fixes this?

edit: confirmed that https://github.com/facebook/react-native/commit/2c5d4cba5c02f6cdf9fb02c78ffd155ad95298d0 fixes it. we will include this in an upcoming minor release

A new version of React Native v0.63.3 has been released. Is there any plan to patch this bug on expo 39?

https://github.com/facebook/react-native/releases/tag/v0.63.3

I found that the fetch function could not read the temporary files generated by the camera, Later, I solved the problem with the FileSystem.Upload() function

Hi, can you share your code, please?

import * as FileSystem from 'expo-file-system';
import { FileSystemUploadType } from "expo-file-system";

const response = await FileSystem.uploadAsync('apiurl', localUri, {
        uploadType: FileSystemUploadType.MULTIPART,
        httpMethod: "POST",
        headers: {
            Accept: 'application/json',
            'Content-Type': 'multipart/form-data',
        },
        fieldName: "file",
        mimeType: "image/jpg",
        parameters: {
            uploadType
        }
    });

use FileSystem.uploadAsync work for me,

While this might be a workaround, its not a fix. We actually will need to hope for a expo cherry pick or bugfix release

@HVHMobileDeveloper don’t close this issue please. Reopen, its not resolved