Skip to content
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

Thumbnail is stored as "application/octet-stream" #78

Closed
wojtha opened this issue Jul 20, 2023 · 0 comments · Fixed by #80
Closed

Thumbnail is stored as "application/octet-stream" #78

wojtha opened this issue Jul 20, 2023 · 0 comments · Fixed by #80

Comments

@wojtha
Copy link
Contributor

wojtha commented Jul 20, 2023

I've enabled the thumbnail processor, unfortunately the thumbnail is uploaded as "application/octet-stream" when uploading to the Google Storage bucket so it can't be served from the bucket.

Version: sqlalchemy_file-0.4.0
Storage driver: GoogleStorageDriver

I did a step debugging of the extra data coming to StorageManager.save_file

Original file extra:

{'content_type': 'image/png', 'meta_data': {'filename': 'Screenshot 2023-05-26 145006.png', 'content_type': 'image/png'}}

Thumbnail file extra:

{'meta_data': {'filename': 'Screenshot 2023-05-26 145006.png.thumbnail116x128.png', 'content_type': 'image/png', 'width': 116, 'height': 128}}

So apparently it is caused by the missing 'content_type': 'image/png' in the thumbnail extra data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant