Fixed image upload bug due to aws creds
This commit is contained in:
parent
47b258d49f
commit
bf6dd9aad4
@ -158,9 +158,9 @@ pub async fn get_all_contacts(db_conn: web::Data<Arc<PgPool>>, request: actix_we
|
|||||||
#[post("images/{item}")]
|
#[post("images/{item}")]
|
||||||
pub async fn upload_image(
|
pub async fn upload_image(
|
||||||
aws_client: web::Data<Arc<aws_sdk_s3::Client>>,
|
aws_client: web::Data<Arc<aws_sdk_s3::Client>>,
|
||||||
|
request: actix_web::HttpRequest,
|
||||||
path_vars: Path<Item>,
|
path_vars: Path<Item>,
|
||||||
multipart: Multipart,
|
multipart: Multipart,
|
||||||
request: actix_web::HttpRequest,
|
|
||||||
) -> TypedHttpResponse<String> {
|
) -> TypedHttpResponse<String> {
|
||||||
auth!(request);
|
auth!(request);
|
||||||
services::admin::upload_image(&aws_client, path_vars.clone(), multipart).await
|
services::admin::upload_image(&aws_client, path_vars.clone(), multipart).await
|
||||||
|
Loading…
Reference in New Issue
Block a user