Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#7701 closed (invalid)

Upload handling documentation outdated

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

Description

Methods like UploadedFile.read() 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 by artagnon, 16 years ago

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
UploadedFile.read() >> Wrong! UploadedFile.data returns an InMemoryUploadedFile object. The documention therefore applies to InMemoryUploadedFile objects and not UploadedFile objects.

comment:2 by Malcolm Tredinnick, 16 years ago

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 by Malcolm Tredinnick, 16 years ago

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 by artagnon, 16 years ago

Resolution: invalid
Status: reopenedclosed

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

comment:5 by Jacob, 12 years ago

milestone: 1.0 alpha

Milestone 1.0 alpha deleted

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