Skip to content

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


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