Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#10902 closed (duplicate)

FileUploadHandler not working, requests are always buffered.

Reported by: tkopczuk@… Owned by: nobody
Component: File uploads/storage Version: 1.0
Severity: Keywords: fileuploadhandler buffering requests
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I've got a problem with limiting the maximum size of a file uploaded
to my webapp. I subclassed FileUploadHandler and everything is working
fine, but only with Django development server.

When running on lighttpd or nginx with mod_fastcgi (actually it
behaves the same with apache + mod_python) my 'new_file' and
'receive_data_chunk' methods are called *after* whole request has been
uploaded to the server... And my intention is to raise SkipFile/
StopUpload when uploaded data exceeds 100 kB or it's not an image.

I thought it's a problem with the web servers, but since not one of them is actually working, it leads me to believe that it might be a problem with Django.

System: Ubuntu Linux 9.04, lighttpd-1.4.19, Django 1.0.2.

Steps to reproduce: attempt to upload an image file larger than 1 MB using attached upload handler.

Attachments (1)

handlers.py (1.6 KB) - added by tkopczuk@… 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by tkopczuk@…

comment:1 follow-up: Changed 5 years ago by grahamd

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Is this the same issue as #10850?

comment:2 in reply to: ↑ 1 Changed 5 years ago by kmtracey

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

Replying to grahamd:

Is this the same issue as #10850?

Yes, thanks for pointing that out. I knew I'd seen discussion of this lately but I thought it was on a mailing list.

comment:3 Changed 3 years ago by jacob

  • milestone 1.0.3 deleted

Milestone 1.0.3 deleted

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.