$client->putObject(array(
'Bucket' => 'buckname',
'Key' => $destination,
'SourceFile' => $source,
'ContentType' =>'image/jpeg', //<-- this is what you need!
'ACL' => 'public-read'//<-- this makes it public so people can see it
));
Related Contents:
- Downloading an entire S3 bucket?
- Make a bucket public in Amazon S3
- S3 – Access-Control-Allow-Origin Header
- S3 Bucket action doesn’t apply to any resources
- How to rename AWS S3 Bucket
- How can I use wildcards to `cp` a group of files with the AWS CLI
- Amazon S3 – HTTPS/SSL – Is it possible? [closed]
- Font from origin has been blocked from loading by Cross-Origin Resource Sharing policy
- AWS S3 CLI – Could not connect to the endpoint URL
- Get last modified object from S3 using AWS CLI
- S3 – What Exactly Is A Prefix? And what Ratelimits apply?
- AWS CLI S3 A client error (403) occurred when calling the HeadObject operation: Forbidden
- How do I delete a versioned bucket in AWS S3 using the CLI?
- How long should I wait after applying an AWS IAM policy before it is valid?
- Faster s3 bucket duplication
- AWS S3 pre signed URL without Expiry date
- Initial setup of terraform backend using terraform
- Difference between upload() and putObject() for uploading a file to S3?
- How list Amazon S3 bucket contents by modified date?
- How do I find the total size of my AWS S3 storage bucket or folder?
- AWS CloudFront: Font from origin has been blocked from loading by Cross-Origin Resource Sharing policy
- Copy directory structure intact to AWS S3 bucket
- How can I reuse existing resources in CloudFormation?
- Setting Access-Control-Allow-Origin on Cloudfront
- Deleting S3 files with a given prefix only
- AWS S3 Bucket name already exists
- AWS Policy must contain valid version string
- Nginx proxy Amazon S3 resources
- Get ARN of S3 Bucket with aws cli
- How to fix ‘Access Denied’ while deleting empty S3 Elastic Beanstalk?
- Access AWS S3 from Lambda within VPC
- Is it better to have multiple s3 buckets or one bucket with sub folders?
- Amazon S3 bucket returning 403 Forbidden
- AWS S3 Bucket policy editor access denied
- aws lambda function getting access denied when getObject from s3
- How to restore folders (or entire buckets) to Amazon S3 from Glacier?
- What is difference between AWS S3 Select and AWS Athena?
- How to set up an OAuth2 Authentication Provider with AWS API Gateway?
- How to delete multiple files in S3 bucket with AWS CLI
- How to get the user’s canonical ID for adding a S3 permission
- AWS CLI S3: copying file locally using the terminal : fatal error: An error occurred (404) when calling the HeadObject operation
- Copy multiple files from s3 bucket
- Amazon S3 object redirect
- How to format a URL to get a file from Amazon S3?
- S3 bucket policy vs access control list
- Limit Size Of Objects While Uploading To Amazon S3 Using Pre-Signed URL
- aws lambda function triggering multiple times for a single event
- How to edit files in AWS S3 in the browser?
- Amazon S3 static hosting with Namecheap DNS – How to correctly route non-www prefixed URL
- A client error (400) occurred when calling the HeadObject operation: Bad Request Completed 1 part(s) with … file(s) remaining