1
0
mirror of https://github.com/actix/examples synced 2024-12-02 18:02:22 +01:00
examples/forms/multipart-s3/README.md

31 lines
622 B
Markdown
Raw Normal View History

2022-03-06 01:41:32 +01:00
# Multipart + AWS S3
Upload a file in multipart form to aws s3 (https://github.com/rusoto/rusoto).
Receive multiple data in multipart form in JSON format and receive it as a struct.
# Usage
2020-02-06 02:51:22 +01:00
```
cd forms/multipart-s3
2020-02-06 02:51:22 +01:00
```
2022-03-06 01:41:32 +01:00
1. copy .env.example .env
1. edit .env AWS_ACCESS_KEY_ID=you_key
1. edit .env AWS_SECRET_ACCESS_KEY=you_key
1. edit .env AWS_S3_BUCKET_NAME=you_key
2020-02-06 02:51:22 +01:00
# Running Server
2022-03-06 01:41:32 +01:00
2020-02-06 02:51:22 +01:00
```
cd forms/multipart-s3
2020-02-06 02:51:22 +01:00
cargo run (or ``cargo watch -x run``)
```
2022-03-06 01:41:32 +01:00
http://localhost:8080
2020-02-06 02:51:22 +01:00
2022-02-18 03:23:48 +01:00
# Using Other Regions
2022-03-06 01:41:32 +01:00
2022-02-18 03:23:48 +01:00
<!-- - https://www.rusoto.org/regions.html -->
2022-03-06 01:41:32 +01:00
2022-02-18 03:13:08 +01:00
- https://docs.rs/rusoto_core/0.42.0/rusoto_core/enum.Region.html