2012年10月26日 星期五

Force write temporary file to disk while uploading in django

vim setting.py
FILE_UPLOAD_MAX_MEMORY_SIZE=0
FILE_UPLOAD_TEMP_DIR=/tmp
FILE_UPLOAD_PERMISSIONS=0644
If you do not want to use memory for cache, just set the FILE_UPLOAD_MAX_MEMORY_SIZE to 0. And all file will be uploaded with a temporary file.

沒有留言:

張貼留言