Merge branch 'release/v13.88' into master
This commit is contained in:
@@ -1697,6 +1697,12 @@ def new_workout_from_file(r, f2,
|
|||||||
# Send an email to info@rowsandall.com with the file attached
|
# Send an email to info@rowsandall.com with the file attached
|
||||||
# for me to check if it is a bug, or a new file type
|
# for me to check if it is a bug, or a new file type
|
||||||
# worth supporting
|
# worth supporting
|
||||||
|
if fileformat == 'gpx':
|
||||||
|
print('aap')
|
||||||
|
os.remove(f2)
|
||||||
|
message = "GPX files support is on our roadmap. Check back soon."
|
||||||
|
return (0, message, f2)
|
||||||
|
|
||||||
if fileformat == 'unknown':
|
if fileformat == 'unknown':
|
||||||
message = "We couldn't recognize the file type"
|
message = "We couldn't recognize the file type"
|
||||||
extension = os.path.splitext(f2)[1]
|
extension = os.path.splitext(f2)[1]
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ def validate_image_extension(value):
|
|||||||
def validate_file_extension(value):
|
def validate_file_extension(value):
|
||||||
import os
|
import os
|
||||||
ext = os.path.splitext(value.name)[1]
|
ext = os.path.splitext(value.name)[1]
|
||||||
valid_extensions = ['.tcx','.csv','.TCX',
|
valid_extensions = ['.tcx','.csv','.TCX','.gpx','.GPX',
|
||||||
'.CSV','.fit','.FIT','.zip','.ZIP',
|
'.CSV','.fit','.FIT','.zip','.ZIP',
|
||||||
'.gz','.GZ','.xls']
|
'.gz','.GZ','.xls']
|
||||||
if not ext in valid_extensions:
|
if not ext in valid_extensions:
|
||||||
|
|||||||
Reference in New Issue
Block a user