Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#7701 closed (invalid)

Upload handling documentation outdated

Reported by: artagnon Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: upload uploadedfile
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Methods like and attributes like UploadedFile.file_name are replaced with .data and .filename in the SVN head respectively. Documentation should be updated accordingly

Change History (5)

comment:1 Changed 8 years ago by artagnon

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Well actually, the documentation is broken.
"The final piece of the puzzle is handling the actual file data from request.FILES. Each entry in this dictionary is an UploadedFile object" >> correct >> Wrong! returns an InMemoryUploadedFile object. The documention therefore applies to InMemoryUploadedFile objects and not UploadedFile objects.

comment:2 Changed 8 years ago by Malcolm Tredinnick

Resolution: invalid
Status: newclosed

An InMemoryUploadedFile is an UploadedFile (it's a subclass). So the documentation is correct. Not all file uploaded will return InMemoryUploadedFile, since large uploads will be saved to disk instead of being stored in memory. Only small uploaded will be handled completely in memory. However you can always use the UploadedFile methods, regardless of whether it's on-disk or in-memory.

comment:3 Changed 8 years ago by Malcolm Tredinnick

Resolution: invalid
Status: closedreopened

Oops, closed too fast. Reopening, since the initial report may well be correct. Comment 1 is not correct, though.

comment:4 Changed 8 years ago by artagnon

Resolution: invalid
Status: reopenedclosed

No initial report is invalid too. My bad. I didn't see the changeset for r7859

comment:5 Changed 5 years ago by Jacob

milestone: 1.0 alpha

Milestone 1.0 alpha deleted

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