Upload files with wsgi

Discussion in 'Python' started by Hidura, Sep 28, 2010.

  1. Hidura

    Hidura Guest

    Hello, i have a project on Python3k, and i have a very big problem i
    don' t find how take an upload file i am using the wsgiref lib, and or
    theres any way to connect to the client in order to get the file by
    myself?

    Thank you
    Diego Hidalgo.

    --
    Enviado desde mi dispositivo móvil

    Diego I. Hidalgo D.
    Hidura, Sep 28, 2010
    #1
    1. Advertising

  2. Hidura

    John Nagle Guest

    On 9/28/2010 3:31 PM, Hidura wrote:
    > Hello, i have a project on Python3k, and i have a very big problem i
    > don' t find how take an upload file i am using the wsgiref lib, and or
    > theres any way to connect to the client in order to get the file by
    > myself?
    >
    > Thank you
    > Diego Hidalgo.


    This is not clear.

    Are you trying to upload a Python program to a server, where
    a web server will run it in response to web requests? Or what?

    Does this involve an Apache server?

    John Nagle
    John Nagle, Sep 28, 2010
    #2
    1. Advertising

  3. Hidura

    Hidura Guest

    I am trying to upload any type of file ext to an app written in Py3k,
    using Apache+mod_wsgi i can't use django or cherryPy because i manage
    the data in the request creating an xml to store the data from
    selected areas and send it to the server. I am using the wsgiref
    library to handle the request and the responses.

    2010/9/28, John Nagle <>:
    > On 9/28/2010 3:31 PM, Hidura wrote:
    >> Hello, i have a project on Python3k, and i have a very big problem i
    >> don' t find how take an upload file i am using the wsgiref lib, and or
    >> theres any way to connect to the client in order to get the file by
    >> myself?
    >>
    >> Thank you
    >> Diego Hidalgo.

    >
    > This is not clear.
    >
    > Are you trying to upload a Python program to a server, where
    > a web server will run it in response to web requests? Or what?
    >
    > Does this involve an Apache server?
    >
    > John Nagle
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >


    --
    Enviado desde mi dispositivo móvil

    Diego I. Hidalgo D.
    Hidura, Sep 29, 2010
    #3
  4. On Sep 28, 11:31 pm, Hidura <> wrote:
    > Hello, i have a project on Python3k, and i have a very big problem i
    > don' t find how take an upload file i am using the wsgiref lib, and or
    > theres any way to connect to the client in order to get the file by
    > myself?
    >
    > Thank you
    > Diego Hidalgo.
    >
    > --
    > Enviado desde mi dispositivo móvil
    >
    > Diego I. Hidalgo D.


    'wsgiref' doesn't do that part of request handling. You want to use
    the 'cgi' module to parse the POST data: http://docs.python.org/library/cgi..html

    Remember to set the enctype on your <form> tags to multipart/form-
    data.

    Chard.
    Richard Thomas, Sep 29, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Brewer

    Re: Snakelets and WSGI

    Robert Brewer, Oct 12, 2004, in forum: Python
    Replies:
    2
    Views:
    351
    Paul Boddie
    Oct 13, 2004
  2. Robert Brewer

    RE: Snakelets and WSGI

    Robert Brewer, Oct 13, 2004, in forum: Python
    Replies:
    3
    Views:
    353
    Irmen de Jong
    Oct 13, 2004
  3. Thomas W

    WSGI-server in the standard distro?

    Thomas W, Aug 7, 2005, in forum: Python
    Replies:
    0
    Views:
    303
    Thomas W
    Aug 7, 2005
  4. Tool69
    Replies:
    10
    Views:
    504
    Martin v. Löwis
    May 25, 2008
  5. gert

    resume upload wsgi script

    gert, Aug 9, 2009, in forum: Python
    Replies:
    9
    Views:
    776
    Diez B. Roggisch
    Aug 13, 2009
Loading...

Share This Page