ajout des boutons upload/download/remove

upload retourne juste le nom du fichier (problème), manque les fonction de l'agent
This commit is contained in:
2023-02-18 12:08:09 +01:00
parent 1d888b290c
commit 5d1ed4e12a
2 changed files with 170 additions and 77 deletions

View File

@@ -69,8 +69,27 @@ def index() :
index_path = os.path.join(os.getcwd(), 'FileExplorer/index.html')
return send_file(index_path)
FILES_=[]
path_file_ex = ""
@app.route('/interact', methods=['POST'])
def interact() :
file_list = request.get_json()["to_send"]
action = file_list.pop(0)
print(file_list)
match action :
case "download" :
print("d")
case "upload" :
print("u")
case "remove" :
print("r")
return 'ok'
FILES_=[]
@app.route('/get_data', methods=['POST'])
def get_data() :
global path_file_ex