I plan to store images on Amazon S3 how to retrieve from Amazon S3 :
- file size
- image height
- image width ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Getting the file size is possible by reading the
Content-Lengthresponse header to a simpleHEADrequest 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.