Code

Opened 2 years ago

Closed 2 years ago

#18291 closed Uncategorized (invalid)

Form wizard does not respect a file field's "upload_to"

Reported by: mbaechtold Owned by: nobody
Component: contrib.formtools Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Problem:

  • Form wizard does not respect a file field's "upload_to", all the files are saved in settings.MEDIA_ROOT only

Setup:

  • A model with a FileField (or ImageField) with "upload_to" pointing to a subfolder of settings.MEDIA_ROOT
  • A model form using the above model
  • A form wizard using the above model form

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by mbaechtold

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

I completely missed the part about the temporary storage of the files uploaded in the form wizard:

https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/#wizard-files

Once the user completes the form wizard, the uploaded file is indeed copied to the folder defined in "upload_to".

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.