#32718: [3.2.1] Issue with assigning file to FileField
-------------------------------------+-------------------------------------
Reporter: Jakub Kleň | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: 3.2.1 file model | Triage Stage: Accepted
filefield fieldfile |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by carderm):
Correct me if I'm wrong, but this fix and also this
[https://github.com/django/django/commit/0b79eb36915d178aef5c6a7bbce71b1e76d376d3
#diff-320a47c2448557011c021e5f288ceeb16a1cb6323d0be62235bba76e57815adeR7
commit] breaks the Django file storage completely...
For instance -
* Having a file field with an upload_to="users"
* Create a new file with name = "steve/file.txt"
* Create another file with name = "john/file.txt"
* Both files will be written (possibly overwritten!!) to: "users/file.txt"
as you are only using the file basename??
Further the commit above (now released in 3.2.1) added: {{{ if name !=
os.path.basename(name):}}} now invalidates the use of paths in the
filename, which previously worked...
--
Ticket URL: <https://code.djangoproject.com/ticket/32718#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.ef26861d714285d69453f5ea234ce217%40djangoproject.com.