diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-19 14:18:03 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2013-01-08 14:51:41 +0100 |
commit | 5018a3557cb4bff707966bddf8c086a6ed10f53b (patch) | |
tree | a2adbf45e87645f4c44016e75991f700bcbb35b9 /mediagoblin/db/util.py | |
parent | 7f4e42b0b15aefcc885c9aacefac3a76f2f7b5ad (diff) | |
download | mediagoblin-5018a3557cb4bff707966bddf8c086a6ed10f53b.tar.lz mediagoblin-5018a3557cb4bff707966bddf8c086a6ed10f53b.tar.xz mediagoblin-5018a3557cb4bff707966bddf8c086a6ed10f53b.zip |
Don't read full image media into RAM on copying (#419)
We copy uploaded media from the queue store to the local workbench
and then to its final destination. The latter was done by simply:
dst.write(src.read()) which is of course evil as it reads the whole
file content into RAM. Which *might* arguably still be OK for
images, but you never know.
Make use of the provided storage() methods that offer chunked copying
rather than opening and fudging with files ourselves.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/db/util.py')
0 files changed, 0 insertions, 0 deletions