Simplify save_image_to_storage.
Review Request #7711 — Created Oct. 19, 2015 and submitted — Latest diff uploaded
The save_image_to_storage template tag is one of the most ancient parts of
Djblets, and it was being way more complicated and fragile than necessary.
Because storage objects now provide anopen
method that returns aFile
object, we can just write the image directly to storage rather than doing a
temporary file dance.This also goes through and renames variables to not be called "file".
Used this with the PDF thumbnailer, which was encountering some raciness in my
setup.