Django

Code

Ticket #7769 (closed: fixed)

Opened 6 months ago

Last modified 5 months ago

[patch] TemporaryUploadedFile is missing a few methods/params

Reported by: Mads Sülau Jørgensen <django@mads.sulau.dk> Assigned to: nobody
Milestone: 1.0 Component: HTTP handling
Version: SVN Keywords: #2070-fixes
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

uploaded_file.diff (2.0 kB) - added by Mads Sülau Jørgensen <django@mads.sulau.dk> on 07/15/08 18:21:30.
uploaded_file.2.diff (2.0 kB) - added by Mads Sülau Jørgensen <django@mads.sulau.dk> on 07/15/08 18:24:14.
Removed write from InMemoryTemporaryFile?

Change History

07/15/08 18:21:30 changed by Mads Sülau Jørgensen <django@mads.sulau.dk>

  • attachment uploaded_file.diff added.

07/15/08 18:24:14 changed by Mads Sülau Jørgensen <django@mads.sulau.dk>

  • attachment uploaded_file.2.diff added.

Removed write from InMemoryTemporaryFile?

08/08/08 16:46:49 changed by jacob

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

08/08/08 16:47:17 changed by jacob

  • summary changed from [patch] Missing seek() whence parameter in TemporaryUploadedFile + add tell() to [patch] TemporaryUploadedFile is missing a few methods/params.

08/17/08 17:16:19 changed by vomjom

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?.

08/22/08 19:14:24 changed by julien

  • milestone set to 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.

08/22/08 19:16:31 changed by julien

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.

08/27/08 15:29:46 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #7769 ([patch] TemporaryUploadedFile is missing a few methods/params)




Change Properties
Action