Closed hdou533 closed 1 month ago
Fix
ContentType: file.mimetype
to uploadParamsconst storage = multer.memoryStorage();
and change Key to const key =
${Date.now()}_${file.originalname};
from s3 uploading fileBucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::hdou533-image-hosting/*"
}
]
}
CORS
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"POST",
"PUT"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
S3 image links not displaying images but downloading it
have tried: