cnfirm file uplod
This commit is contained in:
@@ -238,7 +238,7 @@ def merms_account_payments():
|
||||
@api.route("/panel/account/media-files", methods=["POST"])
|
||||
def get_websitefiles():
|
||||
data = request.get_json()
|
||||
logger.info(f"Route FileUploadService URL Data ==>>>> {data}")
|
||||
# logger.info(f"Route FileUploadService URL Data ==>>>> {data}")
|
||||
response = FileUploadService.member_webfiles(data)
|
||||
return response
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class FileUploadService(BaseService):
|
||||
if not os.path.isdir(FileUploadService.UPLOAD_FOLDER):
|
||||
os.makedirs(FileUploadService.UPLOAD_FOLDER)
|
||||
|
||||
file_uid = "I GOT HERE "
|
||||
file_uid = ""
|
||||
|
||||
try:
|
||||
# Who is this
|
||||
@@ -103,6 +103,14 @@ class FileUploadService(BaseService):
|
||||
logger.info(f'POST CALLED 6 {final_save_path}')
|
||||
|
||||
file.save(final_save_path)
|
||||
|
||||
# Confirm file was created before stamping
|
||||
if os.path.isfile(final_save_path):
|
||||
print(f"'{final_save_path}' was found in the folder '{final_save_path}'")
|
||||
else:
|
||||
print(f"'{final_save_path}' was not found as a file in '{final_save_path}'")
|
||||
|
||||
|
||||
save_file_props = MemberFileData()
|
||||
save_file_props.member_uid = member_uid
|
||||
save_file_props.filename = filename
|
||||
|
||||
Reference in New Issue
Block a user