diff --git a/monkey/monkey_island/cc/resources/pba_file_download.py b/monkey/monkey_island/cc/resources/pba_file_download.py index de85fc291..ad0786f4f 100644 --- a/monkey/monkey_island/cc/resources/pba_file_download.py +++ b/monkey/monkey_island/cc/resources/pba_file_download.py @@ -1,6 +1,7 @@ import flask_restful from flask import send_from_directory -from monkey_island.cc.resources.pba_file_upload import GET_FILE_DIR + +from monkey_island.cc.services.post_breach_files import UPLOADS_DIR __author__ = 'VakarisZ' @@ -12,4 +13,4 @@ class PBAFileDownload(flask_restful.Resource): # Used by monkey. can't secure. def get(self, path): - return send_from_directory(GET_FILE_DIR, path) + return send_from_directory(UPLOADS_DIR, path) diff --git a/monkey/monkey_island/cc/resources/pba_file_upload.py b/monkey/monkey_island/cc/resources/pba_file_upload.py index c15ccf19e..bae46f3a3 100644 --- a/monkey/monkey_island/cc/resources/pba_file_upload.py +++ b/monkey/monkey_island/cc/resources/pba_file_upload.py @@ -11,7 +11,6 @@ import copy __author__ = 'VakarisZ' LOG = logging.getLogger(__name__) -GET_FILE_DIR = "./userUploads" # Front end uses these strings to identify which files to work with (linux of windows) LINUX_PBA_TYPE = 'PBAlinux' WINDOWS_PBA_TYPE = 'PBAwindows' @@ -37,7 +36,7 @@ class FileUpload(flask_restful.Resource): filename = ConfigService.get_config_value(copy.deepcopy(PBA_LINUX_FILENAME_PATH)) else: filename = ConfigService.get_config_value(copy.deepcopy(PBA_WINDOWS_FILENAME_PATH)) - return send_from_directory(GET_FILE_DIR, filename) + return send_from_directory(UPLOADS_DIR, filename) @jwt_required() def post(self, file_type):