simple perl script for file uploads ?

Discussion in 'Perl Misc' started by Jack, Sep 11, 2008.

  1. Jack

    Jack Guest

    Hi I am looking for a NON form based simple script that handles a file
    upload on the server side.. does anyone have a pointer or an example
    of how to do this ? I am working in HTML/Perl/Javascript ASP on IIS
    and looking ideally to do without doing a "form post".

    Thank you,

    Jack
    Jack, Sep 11, 2008
    #1
    1. Advertising

  2. Jack

    Owen Guest

    On Sep 11, 3:32 pm, Jack <> wrote:
    > Hi I am looking for a NON form based simple script that handles a file
    > upload on the server side.. does anyone have a pointer or an example
    > of how to do this ?  I am working in HTML/Perl/Javascript ASP on IIS
    > and looking ideally to do without doing a "form post".



    Have a look at http://search.cpan.org/~gunnar/CGI-UploadEasy-0.11/

    It has many good features.


    Owen
    Owen, Sep 11, 2008
    #2
    1. Advertising

  3. Jack <> writes:

    > Hi I am looking for a NON form based simple script that handles a file
    > upload on the server side.. does anyone have a pointer or an example
    > of how to do this ? I am working in HTML/Perl/Javascript ASP on IIS
    > and looking ideally to do without doing a "form post".


    You seem to be talking about browsers. What is a "form post"? You can't
    portably upload anything without using <FORM>s.

    See CGI's upload() method. This section of the manual seems to describe
    more or less the whole process:

    http://search.cpan.org/~lds/CGI.pm-3.42/CGI.pm#CREATING_A_FILE_UPLOAD_FIELD

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
    Joost Diepenmaat, Sep 11, 2008
    #3
  4. Jack <> writes:

    > Hi I am looking for a NON form based simple script that handles a file
    > upload on the server side..


    Not possible as far as I know, since the only way to trigger a file
    upload from a browser is with an HTML form. There's nothing you can
    put on the server to get around that limitation.

    sherm--

    --
    My blog: http://shermspace.blogspot.com
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Sherm Pendley, Sep 11, 2008
    #4
  5. Jack

    Guest

    Jack <> wrote:
    > Hi I am looking for a NON form based simple script that handles a file
    > upload on the server side.


    So of the N possible user interfaces, where N is a very large number,
    perhaps infinite, you are willing to work with any of the N-1 of them?

    I think a better approach is to define what you want, not what you don't
    want.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    The costs of publication of this article were defrayed in part by the
    payment of page charges. This article must therefore be hereby marked
    advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    this fact.
    , Sep 11, 2008
    #5
  6. Jack

    Jack Guest

    On Sep 11, 9:01 am, wrote:
    > Jack <> wrote:
    > > Hi I am looking for a NON form based simple script that handles a file
    > > upload on the server side.

    >
    > So of the N possible user interfaces, where N is a very large number,
    > perhaps infinite, you are willing to work with any of the N-1 of them?
    >
    > I think a better approach is to define what you want, not what you don't
    > want.
    >
    > Xho
    >
    > --
    > --------------------http://NewsReader.Com/--------------------
    > The costs of publication of this article were defrayed in part by the
    > payment of page charges. This article must therefore be hereby marked
    > advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    > this fact.


    I want to add the ability to post a file from a browser to a server.
    Example is craigslist where the user selects an image file and uploads
    it to their servers. Thats it, its very simple and preferably not via
    a form post since I am using that already with my ajax code thats
    populating my HTML + perl logic into a form, and its advisable to only
    post to one form, not more than 1.

    Thank you,

    Jack
    Jack, Sep 11, 2008
    #6
  7. Jack

    Jack Guest

    On Sep 11, 10:44 am, Jack <> wrote:
    > On Sep 11, 9:01 am, wrote:
    >
    >
    >
    >
    >
    > > Jack <> wrote:
    > > > Hi I am looking for a NON form based simple script that handles a file
    > > > upload on the server side.

    >
    > > So of the N possible user interfaces, where N is a very large number,
    > > perhaps infinite, you are willing to work with any of the N-1 of them?

    >
    > > I think a better approach is to define what you want, not what you don't
    > > want.

    >
    > > Xho

    >
    > > --
    > > --------------------http://NewsReader.Com/--------------------
    > > The costs of publication of this article were defrayed in part by the
    > > payment of page charges. This article must therefore be hereby marked
    > > advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    > > this fact.

    >
    > I want to add the ability to post a file from a browser to a server.
    > Example is craigslist where the user selects an image file and uploads
    > it to their servers. Thats it, its very simple and preferably not via
    > a form post since I am using that already with my ajax code thats
    > populating my HTML + perl logic into a form, and its advisable to only
    > post to one form, not more than 1.
    >
    > Thank you,
    >
    > Jack- Hide quoted text -
    >
    > - Show quoted text -


    Hi I answered Xho's question. Can anyone help here with real example
    Perl code (NOT CGI) that works for browser - server file uploads ?

    thank you,

    Jack
    Jack, Sep 12, 2008
    #7
  8. Jack

    Guest

    Jack <> wrote:
    > >
    > > I want to add the ability to post a file from a browser to a server.


    By post you mean the POST method of HTTP?

    > > Example is craigslist where the user selects an image file and uploads
    > > it to their servers.


    I'm not familiar with that feature of Craig's list. You could look at the
    page source and see how they do it.


    > > Thats it, its very simple and preferably not via
    > > a form post


    What distinguishes a "form" POST from some other kind of POST?

    > > since I am using that already with my ajax code thats
    > > populating my HTML + perl logic into a form, and its advisable to only
    > > post to one form,


    What does it mean to POST to a form? Browsers usually POST *from* forms.

    > > not more than 1.


    Who says that only this is advisable? Who is advising you?

    > Hi I answered Xho's question. Can anyone help here with real example
    > Perl code (NOT CGI)


    In what way is Perl CGI not really Perl? If we are arbitrary not allowed
    to use the best tool for the job, I have to wonder what else you will
    arbitrarily disallow. Are we to spend our time coming up with solutions
    using common modules, only to be told you don't those, either?

    > that works for browser - server file uploads ?


    Browsers generally do not run Perl. If you want to get the browser to POST
    without using the built-in (to the browser) HTTP form submission, then you
    will need to use a language which runs in the browser to accomplish this.

    You seem to be burdened with an excessive number of misconceptions.
    Perhaps you should try JavaScript.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    The costs of publication of this article were defrayed in part by the
    payment of page charges. This article must therefore be hereby marked
    advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    this fact.
    , Sep 12, 2008
    #8
    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. dpackwood
    Replies:
    3
    Views:
    1,792
  2. Todd Denlinger

    file uploads with progress bar

    Todd Denlinger, Oct 21, 2003, in forum: ASP .Net
    Replies:
    8
    Views:
    674
    Kenneth Keeley
    Oct 24, 2003
  3. Lauchlan M

    filenames / extensions with file uploads

    Lauchlan M, Mar 2, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    365
    Lauchlan M
    Mar 3, 2004
  4. Mufasa
    Replies:
    2
    Views:
    266
    Alexey Smirnov
    Dec 21, 2007
  5. Wladimir Borsov
    Replies:
    4
    Views:
    297
    Tintin
    May 11, 2006
Loading...

Share This Page