mirror of
https://github.com/zoffline/zwift-offline.git
synced 2026-01-10 04:05:39 -08:00
Allow achievements upload
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user