-
Notifications
You must be signed in to change notification settings - Fork 51
Add head_object method #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you! I think you should be able to parse the last modified like this. https://github.com/taylorfinnell/awscr-s3/blob/master/src/awscr-s3/responses/list_objects_v2.cr#L26 Also, looks like |
Ah thanks @taylorfinnell I had not seen that :). I've updated the code to parse the time. I'm not sure on the Ameba stuff, I'm currently using 0.28.0 on my project and haven't upgraded yet I'm afraid. |
I've just been looking a bit more into the timezone formatting. I'm using a aws s3 compatible api (min.io) and Last-Modified returns a format like this I'm assuming AWS S3 uses the same format, and with the format I was, however, able to get it working with this
I just wanted to check this is correct for all S3 compatible APIs before I updated the pull request. Are you able to confirm if the current code works? |
I think you are correct https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectHEAD.html Check out the sample response section |
No worries, I've updated the code to work with the different format. |
If you can run a |
No problem, I’m away from my machine for the next few days but I’ll get it done later this week. |
I've run the formatter 👍 |
Thanks! |
Hi,
Thanks for creating this great package.
I'm in a situation where I'd like to be able to access object meta data without fetching the files.
I thought it would be useful to add this as a method
head_object
as this is the API that AWS uses. I've also added a new response type for it.I think it would also be nice to use Crystal's
Time
class for last_modified, but I had some trouble parsing the date format so I've left it as-is.