amazon s3 - 图像下载而不是显示在浏览器中
这让我发疯。我正在使用 php 开发工具包将图像上传到 S3。每当我浏览到图像URL时,浏览器都会下载图像而不是显示它。
我认为这与内容类型有关。
// Prepare to upload the file to S3 bucket.
$s3->create_object($bucket, $file_name, array(
'contentType' => 'binary/octet-stream',
'acl' => AmazonS3::ACL_PUBLIC
));
你能帮忙吗?
谢谢