mirror of
https://github.com/zhigang1992/examples.git
synced 2026-01-12 17:13:21 +08:00
Image Upload Example
Running the app
cdinto theappdirectory and runyarnornpm install- Open
appwithexpo start, try it out.
Running the server
- By default, the app will use a server that is already deployed in order to upload the image to S3. If you want to deploy your own, follow the steps in the backend directory.
The idea behind the example
A common requirement for apps is to be able to upload an image to a server. This example shows how you can use ImagePicker to snap a photo or grab it from your camera roll, then use FormData with fetch to upload it to a server. The /backend demsontrates a simple Node app that uploads an image to S3. The /app directory contains the Expo app that sends the image to that backend.