Private
Public Access
1
0

recognizing img files

This commit is contained in:
Sander Roosendaal
2021-05-10 21:34:32 +02:00
parent 06c50cedfe
commit f03e31e74b

View File

@@ -68,7 +68,8 @@ def validate_file_extension(value):
ext = os.path.splitext(value.name)[1]
valid_extensions = ['.tcx','.csv','.TCX','.gpx','.GPX',
'.CSV','.fit','.FIT','.zip','.ZIP',
'.gz','.GZ','.xls']
'.gz','.GZ','.xls',
'.jpg','.jpeg','.tiff','.png','.gif','.bmp']
if not ext in valid_extensions: # pragma: no cover
raise ValidationError(u'File not supported!')