I plan to store images on Amazon S3 how to retrieve from Amazon S3 :
Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 TB. The largest object that can be uploaded in a single PUT is 5 GB.
To find the size of a single S3 bucket, you can use the S3 console and select the bucket you wish to view. Under Metrics, there's a graph that shows the total number of bytes stored over time.
The more efficient and cost-effective option is to use AWS's S3 service for storing the image files. Using S3 is a very low-cost option. Effectively, all you are paying for is transferring files into an S3 bucket and serving those images to your users.
Individual Amazon S3 objects can now range in size from 1 byte all the way to 5 terabytes (TB). Now customers can store extremely large files as single objects, which greatly simplifies their storage experience.
You can store image dimensions in user-defined metadata when uploading your images and later read this data using REST API.
Refer to this page for more information about user-defined metadata: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
Getting the file size is possible by reading the Content-Length
response header to a simple HEAD
request for your file. Maybe your client can help you with this query. More info on the S3 API docs.
Amazon S3 just provides you with storage, (almost) nothing more. Image dimensions are not accessible through the API. You have to get the whole file, and calculate its dimensions yourself. I'd advise you to store this information in the database when uploading the files to S3, if applicable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With