Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10400 closed (fixed)

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

Reported by: Claude Paroz 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 Claude Paroz 8 years ago.
fileupload.2.diff (783 bytes) - added by Tim Graham 8 years ago.
slightly modified from original patch
fileupload.3.diff (3.3 KB) - added by Tim Graham 8 years ago.
added metadata targets

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by Claude Paroz

Attachment: fileupload.diff added

comment:1 Changed 8 years ago by Claude Paroz

Summary: File upload documentattion should emphasize the need to add multipart/form-dataFile upload documentation should emphasize the need to add multipart/form-data

comment:2 Changed 8 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

Changed 8 years ago by Tim Graham

Attachment: fileupload.2.diff added

slightly modified from original patch

comment:3 Changed 8 years ago by Tim Graham

Triage Stage: AcceptedReady for checkin

Changed 8 years ago by Tim Graham

Attachment: fileupload.3.diff added

added metadata targets

comment:4 Changed 8 years ago by Karen Tracey

Resolution: fixed
Status: newclosed

(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 8 years ago by Karen Tracey

(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 8 years ago by Karen Tracey

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.

Note: See TracTickets for help on using tickets.
Back to Top