Allow achievements upload

This commit is contained in:
oldnapalm
2022-03-19 13:05:54 -03:00
parent 45aff9a6fc
commit f3323a97ea
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@
<div class="row">
<div class="col-md-12">
<input type="file" name="file" class="form-control-file text-shadow-not-ie" />
<label class="text-shadow">(profile.bin / strava_token.txt / garmin_credentials.txt / zwift_credentials.txt)</label>
<label class="text-shadow">(profile.bin / achievements.bin / strava_token.txt / garmin_credentials.txt / zwift_credentials.txt)</label>
</div>
</div>
<div class="row">

View File

@@ -695,7 +695,7 @@ def upload(username):
if request.method == 'POST':
uploaded_file = request.files['file']
if uploaded_file.filename in ['profile.bin', 'strava_token.txt', 'garmin_credentials.txt', 'zwift_credentials.txt']:
if uploaded_file.filename in ['profile.bin', 'achievements.bin', 'strava_token.txt', 'garmin_credentials.txt', 'zwift_credentials.txt']:
file_path = os.path.join(profile_dir, uploaded_file.filename)
uploaded_file.save(file_path)
if uploaded_file.filename == 'garmin_credentials.txt' and credentials_key is not None: