File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 61
61
app .config ['SECRET_KEY' ] = os .urandom (24 )
62
62
app .config ['ROI_FOLDER' ] = "/images/roiDownload"
63
63
64
+ download_folder = os .getenv ('DOWNLOAD_FOLDER' , app .config ['UPLOAD_FOLDER' ])
65
+ app .config ['DOWNLOAD_FOLDER' ] = download_folder
66
+
64
67
#creating a uploading folder if it doesn't exist
65
68
if not os .path .exists (app .config ['TEMP_FOLDER' ]):
66
69
os .mkdir (app .config ['TEMP_FOLDER' ])
@@ -313,7 +316,7 @@ def getSlide(image_name):
313
316
image_name = secure_relative_path (image_name )
314
317
if not verify_extension (image_name ):
315
318
return flask .Response (json .dumps ({"error" : "Bad image type requested" }), status = 400 , mimetype = 'text/json' )
316
- folder = app .config ['UPLOAD_FOLDER ' ]
319
+ folder = app .config ['DOWNLOAD_FOLDER ' ]
317
320
if os .sep in image_name :
318
321
folder_and_file = image_name .rsplit (os .sep , 1 )
319
322
folder = os .path .join (folder , folder_and_file [0 ])
You can’t perform that action at this time.
0 commit comments