Skip to content

Commit aa8258c

Browse files
authored
edit
1 parent 276cbad commit aa8258c

File tree

1 file changed

+10
-3
lines changed
  • How_to_upload_photo,file_in react-native

1 file changed

+10
-3
lines changed

How_to_upload_photo,file_in react-native/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
If you wanted to upload photo/file in react-native, almostly you have found many library such as [react-native-uploader](https://github.com/aroth/react-native-uploader) , [react-native-file-upload](https://github.com/booxood/react-native-file-upload). But I think easiest way is this post, not use library, not write native code, and anybody can understand.
44

5+
# Index
6+
- use fetch
7+
- How can I get photo from gallery?
8+
- How can I add progress?
9+
- Sample (server, photoGallery, imageUpload)
10+
511
# use fetch
612

713
Fetch supports `multipart/form-data`. You can upload your `formdata` like in webbrower. see [this](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Body)
814

9-
### example
15+
### example
1016

1117

1218

@@ -120,9 +126,10 @@ futch(url, {
120126

121127

122128

123-
# Sample
129+
# Sample (server, photoGallery, imageUpload)
124130

125-
use react-native-image-picker and react-native-camera-roll-picker(based on React Native CameraRoll API).
131+
This sample uses react-native-image-picker and react-native-camera-roll-picker(based on React Native CameraRoll API).
132+
Server uses nodeJS.
126133

127134
## [Here](https://github.com/g6ling/react-native-fileUpload-example)
128135

0 commit comments

Comments
 (0)