ver Dec25th
added cache and upload function for setup
This commit is contained in:
@@ -96,6 +96,16 @@ def get_file():
|
||||
# If the file is not found, return a 404 error
|
||||
return jsonify({"error": "File not found"}), 404
|
||||
|
||||
@app.route("/setup/upload", methods=["POST"])
|
||||
def upload_file():
|
||||
# Retrieve filename from the POST request
|
||||
if 'file_path' in request.form and 'file_data' in request.files:
|
||||
file_path = request.form['file_path']
|
||||
file = request.files["file_data"]
|
||||
file.save(file_path)
|
||||
return "File Uploaded"
|
||||
else:
|
||||
return jsonify({"error": "file_path and file_data are required"}), 400
|
||||
|
||||
@app.route('/platform', methods=['GET'])
|
||||
def get_platform():
|
||||
|
||||
Reference in New Issue
Block a user