quoi que j'avais dit

This commit is contained in:
piair 2023-08-21 21:28:18 +02:00
parent aeb93e8a55
commit 38de2f040d
2 changed files with 3 additions and 2 deletions

View File

@ -432,13 +432,14 @@ def upload_file():
if file.filename == '':
print('end of files')
return redirect(url_for('settings_get'))
elif file and allowed_file(file.filename):
filename = secure_filename(file.filename)
print(os.path.join('/app/MsRewards-Reborn/user_data/', filename))
file.save(os.path.join('/app/MsRewards-Reborn/user_data/', filename))
i += 1
print(i)
print(f'file{i}' in request.files)
print("requete bizarre")
return redirect(url_for('settings_get'))

View File

@ -78,7 +78,7 @@
<script>
function addline(ligne){
document.getElementById("table").insertRow(ligne+1).insertCell(0).innerHTML = '<input type="file" id="file' + ligne + 1 + '" name="file' + ligne + 1 + '" onchange="addline(' + ligne + 1 + ')">'
document.getElementById("table").insertRow(int(ligne) + 1).insertCell(0).innerHTML = '<input type="file" id="file' + int(ligne) + 1 + '" name="file' + int(ligne) + 1 + '" onchange="addline(' + int(ligne) + 1 + ')">'
}
</script>