WebFaction
Community site: login faq
0
1

I created a Django app using the cpanel...

"This creates an Apache server with mod_wsgi 3.2 and Python 2.6 installed running Django 1.2.3."

This is running on web167

Is it possible to run a UploadProgressHandler for file uploads or not? Some posts suggests that it is not possible because of server-wide nginx configuration (http://forum.webfaction.com/viewtopic.php?id=2913), and this post describes a work around (http://forum.webfaction.com/viewtopic.php?id=1981)?

According to the first thread,

"All applications and sites on web57+ are automatically deployed behind nginx"

How does the solution in the second thread get around this?

asked 30 Jan '11, 15:40

MvR
111
accept rate: 0%

Old thread, I know, but currently I'm experiencing problems with the likes of filechucker and xupload. Any chance the nginx uploadprogress module can be activated? Also, making a custom apache instance has no bearing on this?

(28 Jun '11, 13:07) yitwail

We still have no plans to add the third-party upload progress module to our Nginx stack. Using a custom Apache will not change that, since it would be running behind our front-end Nginx server.

(28 Jun '11, 16:01) seanf

We currently run nginx on all of our servers as the front-end. So this statement is outdated,

"All applications and sites on web57+ are automatically deployed behind nginx"

The data in both forum posts is mostly outdated so you would need a working example of the code for us to look at. The front-end nginx server does conflict with some headers and it depends on what ones the app will use. You may also find a solution that does not require the headers,

http://pypi.python.org/pypi/gp.fileupload/
permanent link

answered 30 Jan '11, 17:42

johns
5.3k312
accept rate: 23%

edited 30 Jan '11, 17:43

Uploadify is another good one,

http://www.uploadify.com/about/

Update: I double-checked and uploadify does not currently work, i apologize for the mis-info.

(30 Jan '11, 17:47) johns

Just to sum everything up. Our current nginx build does not work with X headers well. They are what make most of the upload progress bar plugins function. There is no way to fix this currently.

(30 Jan '11, 18:05) johns

So there is no way to get uploadify to work with a Django install? Because I have one all set up but when I try to upload a file it displays an HTTP 404 error.

(26 Mar '11, 00:58) joelster9

Can you try with swfupload?

http://blog.fogtunes.com/2009/11/howto-integrate-swfupload-with-django/

Hope that helps!

(26 Mar '11, 01:31) neeravk

Hi! I'm having a similar problem with file uploads progress in django. I wrote a custom file upload handler, but instead of gradually receive the file chunks, my upload handler receives all at once right after upload has finished. I made a research and discovered this on NGINX website: "Note that when using the HTTP Proxy Module (or even when using FastCGI), the entire client request will be buffered in nginx before being passed on to the backend proxied servers. As a result, upload progress meters will not function correctly if they work by measuring the data received by the backend servers." That's exactly what's happening with my upload handler, is there any workaround for this problem? Thanks!

(11 Jul '13, 23:57) M Valverde

Yes, if you need a direct open port for your application we can open a port in the firewall on a secondary shared IP address. However, your client-side code will need to communicate (probably in javascript) to the open port. This will eliminate Nginx entirely and may be what you need- just open a support ticket if having an open port will help.

(12 Jul '13, 03:15) ryans ♦♦

Hi Ryan, Thanks for your answer! If you open that port for my app, would my app become insecure? What are the risks?

(12 Jul '13, 07:15) M Valverde

Not really, because our front-end Nginx server under normal operation just forwards requests to your private Apache instance which runs Django via mod_wsgi. So, you would just be exposing that Apache instance to the Internet (instead of using an Nginx proxy). In and of itself that change should not significantly reduce the security of the application.

The only new attack you'd become vulnerable to would be the set of attacks that would compromise Apache+mod_wsgi but could not penetrate an Nginx proxy_pass, and that set should be a small one indeed (not to mention that any other user on the webserver itself could execute such an attack via localhost, bypassing Nginx anyway). So, in conclusion, opening the port should not be considered a large security risk.

(13 Jul '13, 01:34) ryans ♦♦

Has anyone actually used this:

http://pypi.python.org/pypi/gp.fileupload/


The documentation on the site is dreadful and there don't seem to be any working examples accessible online. Thanks in advance for any help getting it to work.

(09 Feb, 01:36) altsocial
showing 5 of 9 show 4 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×186
×29
×4

question asked: 30 Jan '11, 15:40

question was seen: 6,294 times

last updated: 09 Feb, 01:37

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM