This commit is contained in:
Nyako
2026-06-06 15:30:28 +03:00
parent 21e37776f9
commit b2b2145c37
3 changed files with 123 additions and 26 deletions
+4
View File
@@ -56,6 +56,7 @@ def post(post_id):
@app.route('/file/<path:filename>')
def serve_image(filename):
folder_path = tasks.find_file(filename, FILE_FOLDERS)
print(filename, FILE_FOLDERS)
if folder_path == None:
return make_response("Not found", 404)
else:
@@ -100,6 +101,9 @@ def api():
return "", 200
else:
return "", 500
if data["task"] == "not_found_file":
list_md5_not_found = tasks.get_files_not_found(database, CONFIG_ROOT)
return jsonify({'list': list_md5_not_found}), 200
elif data["type"] == "download":
if not data or 'id' not in data:
return jsonify({'status': 'error', 'message': 'URL not get'}), 400