Missing request token for request, while uploading image file getting error.
See original GitHub issueMissing request token for request, while uploading image file getting error.
Description
While image is uploading to server, sometime its throwing error Missing request token.
React Native version: v0.61.5
Run react-native info
in your terminal and copy the results here.
System: OS: macOS Mojave 10.14.6 CPU: (12) x64 Intel® Core™ i7-8750H CPU @ 2.20GHz Memory: 147.43 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node Yarn: 1.21.1 - /usr/local/bin/yarn npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0 IDEs: Xcode: 11.0/11A420a - /usr/bin/xcodebuild npmPackages: react: 16.12.0 => 16.12.0 react-native: 0.61.5 => 0.61.5 npmGlobalPackages: react-native-cli: 2.0.1
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Add an image from camera and add an image from library.
- then upload images to server.
Expected Results
Images should be uploaded successfully.
Snack, code example, screenshot, or link to a repository:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:59
- Comments:79 (1 by maintainers)
This got fixed in v0.63.3
dataForm.append('file', { uri: Platform.OS=='ios'?photo.uri.replace("file://", "/private"):photo.uri, name: 'photo.jpg', type: 'image/jpg' });
IOS : photo.uri.replace(“file://”, “/private”)