Code

Opened 6 years ago

Closed 6 years ago

#7677 closed (duplicate)

InMemoryFile.read() doesn't work with newforms.ImageField

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

Description

Currently InMemoryFile.read() returns "", if you are using it in conjunction with ImageField. The reason seems to be that ImageField already reads the data, so the position is at -1 and a further read won't return anything.

I included a simple patch, although I am not quite sure, if it's the right way to fix it...

Attachments (1)

newforms_imagefix.diff (463 bytes) - added by apollo13 6 years ago.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by apollo13

comment:1 Changed 6 years ago by axiak

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #7673. Putting updated patch there.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.