uéuéuéuéuéué
This commit is contained in:
parent
bd70557062
commit
7b4250d444
|
@ -412,7 +412,7 @@ def download(filename):
|
||||||
print("file send !")
|
print("file send !")
|
||||||
return send_from_directory(directory='/app/MsRewards-Reborn/user_data/', path=filename, as_attachment=True)
|
return send_from_directory(directory='/app/MsRewards-Reborn/user_data/', path=filename, as_attachment=True)
|
||||||
|
|
||||||
ALLOWED_EXTENSIONS = [".json"]
|
ALLOWED_EXTENSIONS = ["json"]
|
||||||
def allowed_file(filename):
|
def allowed_file(filename):
|
||||||
return '.' in filename and \
|
return '.' in filename and \
|
||||||
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
|
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
|
||||||
|
@ -437,7 +437,6 @@ def upload_file():
|
||||||
file.save(os.path.join('/app/MsRewards-Reborn/user_data/', filename))
|
file.save(os.path.join('/app/MsRewards-Reborn/user_data/', filename))
|
||||||
return redirect(url_for('settings_get'))
|
return redirect(url_for('settings_get'))
|
||||||
|
|
||||||
print("on a atteint la fin, chelou")
|
|
||||||
return redirect(url_for('settings_get'))
|
return redirect(url_for('settings_get'))
|
||||||
|
|
||||||
def maxi(dict):
|
def maxi(dict):
|
||||||
|
|
|
@ -75,9 +75,12 @@
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<form method="POST" action="/upload_file/" enctype=multipart/form-data>
|
<form method="POST" action="/upload_file/" enctype=multipart/form-data>
|
||||||
<input type="file" id="file1" name="file1">
|
<table>
|
||||||
<input type="file" id="file2" name="file2">
|
<tr><input type="file" id="file1" name="file1" onchange="console.log('test')"></tr>
|
||||||
<input type="submit" name="settings" id="submit" value="send file" class="button"/>
|
<tr><input type="file" id="file2" name="file2"></tr>
|
||||||
|
<tr><input type="submit" name="settings" id="submit" value="send file" class="button"/></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue