mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
Bump the aws group with 1 update (#653)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
@ -8,8 +8,8 @@ actix-multipart.workspace = true
|
||||
actix-web.workspace = true
|
||||
actix-web-lab.workspace = true
|
||||
|
||||
aws-config = "0.57"
|
||||
aws-sdk-s3 = "0.35"
|
||||
aws-config = "0.101"
|
||||
aws-sdk-s3 = "0.38"
|
||||
|
||||
dotenvy.workspace = true
|
||||
env_logger.workspace = true
|
||||
|
@ -44,7 +44,7 @@ impl Client {
|
||||
Some((
|
||||
object
|
||||
.content_length()
|
||||
.try_into()
|
||||
.and_then(|len| len.try_into().ok())
|
||||
.expect("file has invalid size"),
|
||||
object.body,
|
||||
))
|
||||
|
@ -6,7 +6,7 @@ use actix_web::{
|
||||
HttpServer, Responder,
|
||||
};
|
||||
use actix_web_lab::{extract::Path, respond::Html};
|
||||
use aws_config::meta::region::RegionProviderChain;
|
||||
use aws_config::{meta::region::RegionProviderChain, BehaviorVersion};
|
||||
use dotenvy::dotenv;
|
||||
use serde_json::json;
|
||||
|
||||
@ -90,7 +90,10 @@ async fn main() -> std::io::Result<()> {
|
||||
|
||||
log::info!("configuring S3 client");
|
||||
let aws_region = RegionProviderChain::default_provider().or_else("us-east-1");
|
||||
let aws_config = aws_config::from_env().region(aws_region).load().await;
|
||||
let aws_config = aws_config::defaults(BehaviorVersion::latest())
|
||||
.region(aws_region)
|
||||
.load()
|
||||
.await;
|
||||
|
||||
// create singleton S3 client
|
||||
let s3_client = Client::new(&aws_config);
|
||||
|
Reference in New Issue
Block a user