@pbdev try to store it like this: $attachment->storeAs($path, $fileName, 's3');
File upload, AWS S3 and mime-type issue
Uploading images on S3 https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/12
I have an issue here
$file = request()->file('avatar')->store('user/avatars');
$full_path = Storage::disk('s3')->url($file);
When you upload an image in this way, 'store' function doesn't tell S3 bucket what mime-type has this image (or file). And when you try to retrieve the uploaded image in the browser by it's URL, a browser will DOWNLOAD (it won't open as users expect) due to incorrect mime-type. By default S3 sets 'application/octet-stream' mime-type.
Does anybody know how to pass mime-type to S3 bucket?
Please or to participate in this conversation.