#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 Mariusz Felisiak):

 > Correct me if I'm wrong, but this fix and also this ​commit breaks the
 Django file storage completely...

 It's
 
[https://docs.djangoproject.com/en/3.2/ref/models/fields/#django.db.models.fields.files.FieldFile.save
 documented] that the `FieldField.save()'s` `name` argument ''"is the name
 of the file"'' not a path. You can define `upload_to` as a function to use
 subdirectories, see an example in `FileField.upload_to`
 
[https://docs.djangoproject.com/en/3.2/ref/models/fields/#django.db.models.FileField.upload_to
 docs].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32718#comment:7>
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.a6ff8c4fc56c731bf0b424277517562a%40djangoproject.com.

Reply via email to