Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve compatibility of
thumbnail
tag with remote storage backends (Google Cloud Storage) and filesystem-less deployments (Appengine)The
thumbnail
tag doesn't work on Google Appengine (GAE) withoutthese changes -- in that environment, the file system is mounted
read-only, and as such generated thumbnail images cannot be written to
it, (even temporarily).
Moreover, the pre-existing check for already-generated thumbnails
assumed a FileSystemStorage backend, (and indeed went around it); as
such, thumbnails were regenerated upon every request. These changes
leverage the file storage backend for this check, for more generalized
and optimized compatibility.
To note, the thumbnail function is also made to rely more completely on
the default storage backend when saving -- refactoring this block
slightly -- to simply use
default_storage.open()
. This featurescompatibility with both remote and local storage backends, without
additional work.
Finally, this change set updates the AUTHORS file, (in line with
contribution guidelines).