If you plan to use Paster in production, you can use gp.fileupload:
http://pypi.python.org/pypi/gp.fileupload/
If e.g. you plan to use uWSGI, Nginx and Cherokee have modules for
handling this, e.g. http://wiki.nginx.org/HttpUploadProgressModule
--
Juliusz Gonera
http://juliuszgonera.com/
On Sun, Jan 16, 2011 at 2:59 AM, He Shiming <hesh...@gmail.com> wrote:
> On Jan 16, 1:14 am, Juliusz Gonera <jgon...@gmail.com> wrote:
>>
>> If you plan to use Paster in production, you can use gp.fileupload:http://pypi.python.org/pypi/gp.fileupload/
>> If e.g. you plan to use uWSGI, Nginx and Cherokee have modules for
>> handling this, e.g.http://wiki.nginx.org/HttpUploadProgressModule
>>
>> --
>> Juliusz Gonerahttp://juliuszgonera.com/
>
> Thanks. I did try gp.fileupload. But the demo http://www.gawel.org/docs/gp.fileupload/demo.html
> didn't work on my chrome and firefox browsers. I'm not seeing any
> progress at all.
>
Yeah look like my demo is broken... But the interesting stuff (which
is not the javascript part..) should work.
You need this middleware: http://www.gawel.org/docs/gp.fileupload/upload.html
> On the other hand, I'm not aware of the difference between paster and
> nginx's module. I'm currently developing my application under paster.
> Does that mean I can't run my app in nginx? If I use the nginx module,
> does that mean I have to continue development in nginx only?
>
Of course. And I strongly encourage this way. gp.fileupload replace
the wsgi.input and this is not recommended. (it work though.. :)
You can use nginx to act as a reverse proxy (if the module support a
proxy ?) and use the upload module for some specific paths.
Like Juliusz said you can also use uWSGI (paster is also a WSGI server)
I do not known about this module but It's probably a cleverer solution
than gp.fileupload since it's embed in a robust web server.
The problem is that you need the whole environment to develop and test
your application.
Having all the stuff in a python process is simpler but it's also less
efficient in production IMHO.
--
Gael
> Best regards,
> He Shiming
>
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To post to this group, send email to pylons-...@googlegroups.com.
> To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
>
>
> The problem is that you need the whole environment to develop and test
> your application.
> Having all the stuff in a python process is simpler but it's also less
> efficient in production IMHO.
What I currently do is to use both - gp.fileupload for development and
Nginx module in production. The interface is a bit different though so I
had to write my own JS. It first tries to query Nginx module and if it
gets 404 (which means that Paster is used) it sends a request to
gp.fileupload. You can have a look at it:
https://gist.github.com/781722
${c.upload_id} is a random ID generated in Pylons.