Code

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10400 closed (fixed)

File upload documentation should emphasize the need to add multipart/form-data

Reported by: claudep Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Even if it is explained in the request-response documentation (http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.FILES), I suggest to repeat the need to add multipart/form-data to the form tag in the 'File Upload' documentation. Following a patch which simply repeat the request-reponse note about it in the topics/http/file-uploads.txt doc file.

Attachments (3)

fileupload.diff (608 bytes) - added by claudep 5 years ago.
fileupload.2.diff (783 bytes) - added by timo 5 years ago.
slightly modified from original patch
fileupload.3.diff (3.3 KB) - added by timo 5 years ago.
added metadata targets

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by claudep

comment:1 Changed 5 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from File upload documentattion should emphasize the need to add multipart/form-data to File upload documentation should emphasize the need to add multipart/form-data

comment:2 Changed 5 years ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

Changed 5 years ago by timo

slightly modified from original patch

comment:3 Changed 5 years ago by timo

  • Triage Stage changed from Accepted to Ready for checkin

Changed 5 years ago by timo

added metadata targets

comment:4 Changed 5 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from new to closed

(In [10816]) Fixed #10400: Added a note in the file uploads doc about the correct form type needed for file uploads to work. Thanks claudep and timo.

comment:5 Changed 5 years ago by kmtracey

(In [10817]) [1.0.X] Fixed #10400: Added a note in the file uploads doc about the correct form type needed for file uploads to work. Thanks claudep and timo.

r10816 from trunk.

comment:6 Changed 5 years ago by kmtracey

Note I didn't used the metadata target version of the patch because it seems to reference model fields, yet this doc is strictly about forms, so shouldn't the pointers reference form fields? Feel free to open another ticket to get the references in, but either point them to form fields or explain why they should go to ~django.db.models.FileField, e.g. ... that doesn't look right to me when the code examples are just using form fields.

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.