Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#7769 closed (fixed)

[patch] TemporaryUploadedFile is missing a few methods/params

Reported by: Mads Sülau Jørgensen <django@…> Owned by: nobody
Component: HTTP handling Version: dev
Severity: Keywords: #2070-fixes
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

seek on TemporaryUploadedFile is missing the whence parameter.

TemporaryUploadedFile and InMemoryUploadedFile are missing tell() methods, which has been added for convenience.

Also renames file on InMemoryUploadedFile for consistency with TemporaryUploadedFile.

Attachments (2)

uploaded_file.diff (2.0 KB ) - added by Mads Sülau Jørgensen <django@…> 16 years ago.
uploaded_file.2.diff (2.0 KB ) - added by Mads Sülau Jørgensen <django@…> 16 years ago.
Removed write from InMemoryTemporaryFile

Download all attachments as: .zip

Change History (9)

by Mads Sülau Jørgensen <django@…>, 16 years ago

Attachment: uploaded_file.diff added

by Mads Sülau Jørgensen <django@…>, 16 years ago

Attachment: uploaded_file.2.diff added

Removed write from InMemoryTemporaryFile

comment:1 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Jacob, 16 years ago

Summary: [patch] Missing seek() whence parameter in TemporaryUploadedFile + add tell()[patch] TemporaryUploadedFile is missing a few methods/params

comment:3 by vomjom, 16 years ago

This patch fixes an issue I had, but I'd like to mention that it still has a bug:

SimpleUploadedFile is a subclass of InMemoryUploadedFile, so it uses its tell() and seek() functions, which expect a _file member, but SimpleUploadedFile calls it file, so those functions don't work for a SimpleUploadedFile.

comment:4 by Julien Phalip, 16 years ago

milestone: 1.0

#7900 was closed at a dupe, as it only looked at the missing tell method and therefore was a subset of this ticket. Also setting this one as milestone 1.0.

comment:5 by Julien Phalip, 16 years ago

One question though. Since this ticket is adding new features, can it actually be considered for 1.0? #7900 was set to 1.0, that's why I just set this one as well, but a core dev might think otherwise.

comment:6 by Jacob, 16 years ago

Resolution: fixed
Status: newclosed

(In [8634]) Fixed #7769: Added a couple missing file methods to TemporaryUploadedFile. Thanks, Mads Sülau Jørgensen.

comment:7 by Jacob, 12 years ago

milestone: 1.0

Milestone 1.0 deleted

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