Thumbnail generation bug
When a new document is uploaded on an external store (ie. S3), generated thumbnail has no applied transformations (should be resized to 800px width by default). Apparently, it's a race condition that happens when DocumentPage.generate_image() calls DocumentPage.get_image() which in turn tries to read a cached full-size image to apply transformations. If file is not found in cache, after retrieval from external store, transformed image is not returned correctly.