mirror of
https://github.com/actix/examples
synced 2025-06-27 01:27:43 +02:00
migrate s3 example to aws-sdk-s3
This commit is contained in:
@ -1,30 +1,21 @@
|
||||
# Multipart + AWS S3
|
||||
|
||||
Upload a file in multipart form to aws s3 (https://github.com/rusoto/rusoto).
|
||||
Upload a file in multipart form to AWS S3 using [AWS S3 SDK](https://crates.io/crates/aws-sdk-s3).
|
||||
Receive multiple data in multipart form in JSON format and receive it as a struct.
|
||||
|
||||
# Usage
|
||||
|
||||
```
|
||||
```sh
|
||||
cd forms/multipart-s3
|
||||
```
|
||||
|
||||
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
|
||||
1. edit .env AWS_ACCESS_KEY_ID=your_key
|
||||
1. edit .env AWS_SECRET_ACCESS_KEY=your_key
|
||||
1. edit .env AWS_S3_BUCKET_NAME=your_chosen_region
|
||||
|
||||
# Running Server
|
||||
|
||||
```
|
||||
cd forms/multipart-s3
|
||||
cargo run (or ``cargo watch -x run``)
|
||||
```sh
|
||||
cargo run
|
||||
```
|
||||
|
||||
http://localhost:8080
|
||||
|
||||
# Using Other Regions
|
||||
|
||||
<!-- - https://www.rusoto.org/regions.html -->
|
||||
|
||||
- https://docs.rs/rusoto_core/0.42.0/rusoto_core/enum.Region.html
|
||||
<http://localhost:8080>
|
||||
|
Reference in New Issue
Block a user