Compare commits

...

2 Commits

Author SHA1 Message Date
rubenwardy
04e8ae5bdd Fix unexpected crash on bad Github URL 2019-08-09 11:17:39 +01:00
rubenwardy
18b9fb3876 Fix typo in zip uploading 2019-08-09 11:10:45 +01:00
2 changed files with 5 additions and 1 deletions

View File

@@ -29,6 +29,10 @@ from app.utils import randomString
class GithubURLMaker:
def __init__(self, url):
self.baseUrl = None
self.user = None
self.repo = None
# Rewrite path
import re
m = re.search("^\/([^\/]+)\/([^\/]+)\/?$", url.path)

View File

@@ -50,7 +50,7 @@ def doFileUpload(file, fileType, fileTypeDesc):
if fileType == "image":
allowedExtensions = ["jpg", "jpeg", "png"]
isImage = True
elif filetype == "zip":
elif fileType == "zip":
allowedExtensions = ["zip"]
else:
raise Exception("Invalid fileType")