You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When getting the size of a key that was just fetched from a bucket, the size reports 0 until, as far as I can tell, read the keys data then size will report correctly. Example below.
Doing a little digging I see that when we're trying to get_key, we're using a HEAD which is what the boto docs say it does. But they're returning a key object and moto's returning "". Changing "" to key.value in moto/s3/responses.py line 167 appears to fix this problem. I ran the test's and they all passed after the change. Hope this helps.
When getting the
size
of a key that was just fetched from a bucket, thesize
reports0
until, as far as I can tell, read the keys data thensize
will report correctly. Example below.boto==2.14.0
The text was updated successfully, but these errors were encountered: