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

sorl-thumbnail cache does not work with AWS S3 Signature Version 4 #449

Closed
dalguji opened this issue Mar 15, 2016 · 0 comments
Closed

sorl-thumbnail cache does not work with AWS S3 Signature Version 4 #449

dalguji opened this issue Mar 15, 2016 · 0 comments

Comments

@dalguji
Copy link

dalguji commented Mar 15, 2016

After I moved the region of my AWS S3 bucket from Tokyo to Seoul, I realized sorl-thumbnail within my website generates thumbnail images every time it loads the web page and it causes about 15 second delay to load.

I found that it is because my new S3 region, Seoul, provides Signature Version 4 only and it gives the file URL with trailing parameters like ?X-Amz-Algorithm=...&... always.

Do you think there is any solution with sorl-thumbnail codes/settings for this issue? Or should I just upload files as public all the time?

The following are the sample records of thumbnail_kvstore table for your reference.

 sorl-thumbnail||image||e183ee838fe83addfa658220fe30      | {"storage": "sorl.thumbnail.images.UrlStorage", "name": "https://my-bucket.s3.ap-northeast-2.amazonaws.com/work/1.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=9e035489a1a...117760f1bd5&X-Amz-Date=20160315T091447Z&X-Amz-Credential=AKIA...NNHA%2F20160315%2Fap-northeast-2%2Fs3%2Faws4_request", "size": [1770, 1770]}
 sorl-thumbnail||image||58a51e8097dc5361ef4cec94c73e      | {"storage": "apps.s3utils.MyS3BotoStorage", "name": "cache/ec/d2/ecd2feb7f819e87b1ad7a9a4bf3b21f.jpg", "size": [1000, 1000]}
 sorl-thumbnail||thumbnails||e183ee838fe83ade7a658220fe30 | ["58a51e8097dc2361ef4cec94c73e"]
cooldplay added a commit to cooldplay/sorl-thumbnail that referenced this issue Apr 25, 2016
mariocesar added a commit that referenced this issue Sep 28, 2016
mariocesar added a commit that referenced this issue Sep 28, 2016
* beoreoji-s3fix:
  fix indentation
  Fixed #449
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

No branches or pull requests

1 participant