Convert the 'document_save_to_temp_dir' utility function into a method of the Document model
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
import os
|
||||
|
||||
from common.settings import TEMPORARY_DIRECTORY
|
||||
|
||||
|
||||
def document_save_to_temp_dir(document, filename, buffer_size=1024 * 1024):
|
||||
temporary_path = os.path.join(TEMPORARY_DIRECTORY, filename)
|
||||
return document.save_to_file(temporary_path, buffer_size)
|
||||
Reference in New Issue
Block a user