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

Added STORAGE (thumbor_cloud_storage.storages.cloud_storage) #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JackDavidson
Copy link

I added support for thumbor's STORAGE option. This saves the original image to the bucket. So that paths do not conflict, I set the default value of STORAGE_CLOUD_STORAGE_ROOT_PATH to thumbor/storage and changed the default of RESULT_STORAGE_CLOUD_STORAGE_ROOT_PATH to thumbor/result_storage

@@ -74,7 +74,7 @@ def get(self):
return blob.download_as_string()

def normalize_path(self, path):
path_segments = [self.context.config.get('RESULT_STORAGE_CLOUD_STORAGE_ROOT_PATH','thumbor/').rstrip('/'), Storage.PATH_FORMAT_VERSION, ]
path_segments = [self.context.config.get('RESULT_STORAGE_CLOUD_STORAGE_ROOT_PATH','thumbor/result_storage').rstrip('/'), Storage.PATH_FORMAT_VERSION, ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a backwards incompatible change, won't it? Which could incur a bunch of cache misses and costs to those upgrading.

I think it'd be better to recommend this and leave the result storage where it is, and then move the other storage into a subdirectory or different root directory, e.g. thumbor-strorage, with a recommendation to move them into better named directories or sub-directories.

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 this pull request may close these issues.

2 participants