| Crates.io | presigned-post-rs |
| lib.rs | presigned-post-rs |
| version | 0.1.0 |
| created_at | 2024-12-17 12:52:15.875176+00 |
| updated_at | 2024-12-17 12:52:15.875176+00 |
| description | Presigned post object operation for aws s3 api |
| homepage | |
| repository | https://github.com/ghashy/presigned-post-rs |
| max_upload_size | |
| id | 1486217 |
| size | 26,699 |
Simple presigned post for aws s3 api.
use time::OffsetDateTime;
use presigned_post_rs::PresignedPostData;
use presigned_post_rs::mediatype;
fn main() {
let presigned_post = PresignedPostData::builder(
"access_key",
"key_id",
"https://storage.yandexcloud.net",
"ru-central1",
"test-data",
"image.png",
)
.with_mime(mediatype::media_type!(IMAGE / PNG))
.with_date(OffsetDateTime::UNIX_EPOCH)
.with_expiration(time::Duration::minutes(10))
.with_content_length_range(0, 5 * 1_000_000)
.build()
.expect("Failed to build presigned post");
}