Opened 4 years ago
Closed 4 years ago
#31995 closed Bug (needsinfo)
Unnecesarry quotes are created by TemporaryUploadedFile.
Reported by: | jehat armanç deniz | Owned by: | nobody |
---|---|---|---|
Component: | File uploads/storage | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Carlton Gibson | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
_, ext = os.path.splitext(name)
this line rarely creates extensions like ' mp4" ' according to name of file
It puts one more unnecessary quote and causes errors in some complex named videos
i recommend to use ext = ext.replace('"', "")
this line to fix after that line
Attachments (3)
Change History (5)
by , 4 years ago
Attachment: | errors.PNG added |
---|
comment:1 by , 4 years ago
Summary: | while uploading file it creates an unnecesarry quote → while uploading file it creates an unnecesarry quote in uploadedfile.py/temporaryfileuploadedfile __init__ |
---|
comment:2 by , 4 years ago
Cc: | added |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
Summary: | while uploading file it creates an unnecesarry quote in uploadedfile.py/temporaryfileuploadedfile __init__ → Unnecesarry quotes are created by TemporaryUploadedFile. |
As far as I'm aware TemporaryUploadedFile
should receive an unquoted filename, so the main question is why quoted name was passed. It looks that you're using Django 2.2 (which doesn't receive bugfixes anymore), can you reproduce this issue with Django 3.1? It can also be an issue in DRF, can you reproduce it without DRF?
this file is showing errors raised after post request we throw