Code

Opened 7 years ago

Closed 6 years ago

#5386 closed (fixed)

content type for newforms.UploadedFile

Reported by: Petr Marhoun <petr.marhoun@…> Owned by: nobody
Component: Forms Version: master
Severity: Keywords: newforms, file uploads
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I think that it would be nice if django.newforms.UploadedFile has attribute content_type - see the attached patch.

Attachments (2)

file-field-content-type.diff (951 bytes) - added by Petr Marhoun <petr.marhoun@…> 7 years ago.
newforms.content_type.diff (1.8 KB) - added by Ionut Ciocirlan <ionut.ciocirlan@…> 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Petr Marhoun <petr.marhoun@…>

comment:1 Changed 6 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 6 years ago by Ionut Ciocirlan <ionut.ciocirlan@…>

comment:2 Changed 6 years ago by Ionut Ciocirlan <ionut.ciocirlan@…>

Attached a patch that applies against rev. 7397. Also updated documentation.

comment:3 Changed 6 years ago by Petr Marhoun <petr.marhoun@…>

  • Resolution set to fixed
  • Status changed from new to closed

It is fixed now - FileField returns by default django.core.files.uploadedfile.UploadedFile - with attribute content_type. So I think this ticket could be closed.

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.