Update main.py
This commit is contained in:
parent
7711c4c552
commit
212bf7ca75
6
main.py
6
main.py
@ -142,9 +142,7 @@ If you wan't to delete a file ask the hoster of the instance!!"
|
|||||||
remove(file_path)
|
remove(file_path)
|
||||||
if re.search("^curl/.*", str(user_agent)):
|
if re.search("^curl/.*", str(user_agent)):
|
||||||
return PlainTextResponse(f"file {file} deleted from the server\n")
|
return PlainTextResponse(f"file {file} deleted from the server\n")
|
||||||
else:
|
return RedirectResponse(request.url_for("files"))
|
||||||
return RedirectResponse(request.url_for("files"))
|
|
||||||
if re.search("^curl/.*", str(user_agent)):
|
if re.search("^curl/.*", str(user_agent)):
|
||||||
return PlainTextResponse(f"file {file} doesn't exist on the server\n")
|
return PlainTextResponse(f"file {file} doesn't exist on the server\n")
|
||||||
else:
|
return RedirectResponse(request.url_for("files"))
|
||||||
return RedirectResponse(request.url_for("files"))
|
|
Loading…
Reference in New Issue
Block a user