Minor fixes: Removed debugging log and improved readability in PBA path const
This commit is contained in:
parent
4f43edbefb
commit
bde2288da0
|
@ -39,7 +39,6 @@ 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))
|
||||
LOG.info(f"Current dir:{os.getcwd()}")
|
||||
return send_from_directory(ABS_UPLOAD_PATH, filename)
|
||||
|
||||
@jwt_required
|
||||
|
|
|
@ -6,6 +6,8 @@ import monkey_island.cc.services.config
|
|||
|
||||
__author__ = "VakarisZ"
|
||||
|
||||
from monkey_island.cc.consts import MONKEY_ISLAND_ABS_PATH
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Where to find file names in config
|
||||
|
@ -14,8 +16,7 @@ PBA_LINUX_FILENAME_PATH = ['monkey', 'post_breach', 'PBA_linux_filename']
|
|||
UPLOADS_DIR_NAME = 'userUploads'
|
||||
|
||||
|
||||
_PBA_UPLOAD_PATH = [os.getcwd(), 'monkey_island', 'cc', UPLOADS_DIR_NAME]
|
||||
ABS_UPLOAD_PATH = Path(*_PBA_UPLOAD_PATH)
|
||||
ABS_UPLOAD_PATH = Path(MONKEY_ISLAND_ABS_PATH, 'cc', UPLOADS_DIR_NAME)
|
||||
|
||||
|
||||
def remove_PBA_files():
|
||||
|
|
Loading…
Reference in New Issue