add 301 redirect on successful upload
This commit is contained in:
parent
d5877058e3
commit
96d7ba1a9e
6
app.py
6
app.py
|
@ -81,7 +81,11 @@ def upload_file():
|
||||||
thread.start()
|
thread.start()
|
||||||
print(f"thread started for {file.filename=}")
|
print(f"thread started for {file.filename=}")
|
||||||
|
|
||||||
return "File uploaded successfully"
|
response = make_response(make_response("file uploaded succesfully", 301))
|
||||||
|
response.headers["Location"] = "/"
|
||||||
|
response.status_code = 301
|
||||||
|
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/run/<string:cassetta>", methods=["GET"])
|
@app.route("/run/<string:cassetta>", methods=["GET"])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user