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
With changes in boto/botocore#1985 save to FileField where content is StringIO based ContentFile (initialised with string instead of bytes) now raises TypeError: Unicode-objects must be encoded before hashing as it tries to calculate MD5 sum on string where it expects bytes.
Similar to boto I don't know how to properly detect the encoding. Given force_bytes is already used which assumes utf-8 I think it's reasonable to do that but it isn't strictly correct.
With changes in boto/botocore#1985 save to
FileField
where content isStringIO
basedContentFile
(initialised with string instead of bytes) now raisesTypeError: Unicode-objects must be encoded before hashing
as it tries to calculate MD5 sum on string where it expects bytes.Already mentioned the issue in
botocore
boto/botocore#1985 (comment)
As a possible solution
django-storages
could ensure that content is bytes atThe text was updated successfully, but these errors were encountered: