BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
All files uploaded to S3 have mime type application/octet-stream
#39 opened by Rob
Description
Solution:
Ansel 1.0.5 has been released. https://buzzingpixel.com/software/treasury/changelog/1-0-5
Apologies if I'm missing something basic, I only have a limited knowledge of S3 (so wonder if this is a permisssions issue). Everytime I upload a file, irrelevant if its a jpeg, png or SVG - ExpressionEngine logs the correct mime type, however, in S3 its marked as application/octet-stream.
Replies
- RobReplied 8/24/2017 8:43 AM, Edited 8/29/2017 9:57 PM A quick temporary hack which got me going: Around line 50 on /users/addons/treasury/Service/FileHandling/amazon_s3.php Add: 'ContentType' => mime_content_type($sourcePath)to the $s3->putObject array.It should now be: $s3->putObject(array( 'Bucket' => $locationModel->bucket, 'Key' => $key, 'SourceFile' => $sourcePath, 'ACL' => 'public-read', 'ContentType' => mime_content_type($sourcePath) ));
- TJ DraperReplied 8/24/2017 9:42 AM, Edited 8/29/2017 9:57 PM Hi Rob, I haven't run into this issue before but the fix you mention does seem reasonable. I’ll look into it. 
- TJ DraperReplied 8/29/2017 9:57 PM Ansel 1.0.5 has been released. https://buzzingpixel.com/software/treasury/changelog/1-0-5