mirror of https://github.com/veops/cmdb.git
fix(api): svg upload (#321)
This commit is contained in:
parent
18313b7bd1
commit
a6e2aca281
|
@ -46,6 +46,8 @@ class PostFileView(APIView):
|
||||||
if not file:
|
if not file:
|
||||||
abort(400, ErrFormat.file_is_required)
|
abort(400, ErrFormat.file_is_required)
|
||||||
extension = file.mimetype.split('/')[-1]
|
extension = file.mimetype.split('/')[-1]
|
||||||
|
if '+' in extension:
|
||||||
|
extension = file.filename.split('.')[-1]
|
||||||
if file.filename == '':
|
if file.filename == '':
|
||||||
filename = f'.{extension}'
|
filename = f'.{extension}'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue