File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -462,7 +462,9 @@ def create(self, request):
462462 path = Path (path )
463463 name = path .name
464464
465- if (Path (path ).suffix .lower ().endswith (".csv" ) or Path (path ).suffix .lower ().endswith (".txt" ) or
465+ if (Path (path ).suffix .lower ().endswith (".pdf" ) or Path (path ).suffix .lower ().endswith (".docx" ) or Path (path ).suffix .lower ().endswith (".xlsx" ) or
466+ Path (path ).suffix .lower ().endswith (".doc" ) or Path (path ).suffix .lower ().endswith (".csv" ) or Path (path ).suffix .lower ().endswith (".txt" ) or
467+ Path (path ).suffix .lower ().endswith (".xls" ) or Path (path ).suffix .lower ().endswith (".pptx" ) or Path (path ).suffix .lower ().endswith (".ppt" ) or
466468 Path (path ).suffix .lower ().endswith (".json" ) or Path (path ).suffix .lower ().endswith (".sqlite" )):
467469 # This is an auxiliary file, not an image.
468470 newFile = models .AuxiliaryFile (image_set = imageset , name = name , filesize = os .path .getsize (path ))
Original file line number Diff line number Diff line change @@ -325,7 +325,9 @@ def upload_image(request, imageset_id):
325325 path = Path (path )
326326 name = path .name
327327
328- if (Path (path ).suffix .lower ().endswith (".csv" ) or Path (path ).suffix .lower ().endswith (".txt" ) or
328+ if (Path (path ).suffix .lower ().endswith (".pdf" ) or Path (path ).suffix .lower ().endswith (".docx" ) or Path (path ).suffix .lower ().endswith (".xlsx" ) or
329+ Path (path ).suffix .lower ().endswith (".doc" ) or Path (path ).suffix .lower ().endswith (".csv" ) or Path (path ).suffix .lower ().endswith (".txt" ) or
330+ Path (path ).suffix .lower ().endswith (".xls" ) or Path (path ).suffix .lower ().endswith (".pptx" ) or Path (path ).suffix .lower ().endswith (".ppt" ) or
329331 Path (path ).suffix .lower ().endswith (".json" ) or Path (path ).suffix .lower ().endswith (".sqlite" )):
330332 # This is an auxiliary file, not an image.
331333
You can’t perform that action at this time.
0 commit comments