file uploader script

Discussion in 'Perl Misc' started by ll, Oct 10, 2007.

  1. ll

    ll Guest

    I'm working with an uploader script and am trying to establish the
    parent directory to which files will be uploaded. However, after the
    parent directory is set in the code and the file is uploaded, a folder
    is created 'under' the cgi-bin folder that has the full path name as
    its title, rather than using that path as the basis upon which to
    concatenate the rest of the path. The page, when run, says that the
    file has been uploaded successfully, but when following the link it
    generates to the file, it cannot be opened, due to a repeat in the
    path (e.g. www.mysite.com/uploads/uploads/test.txt)

    Here is the URL for the download for this: http://www.cnctek.com/bizdb-html/download.html

    Follow this link:
    Download File Uploader - use "guest" for user name and password

    Thanks for any help or resources,
    Louis
     
    ll, Oct 10, 2007
    #1
    1. Advertising

  2. ll wrote:
    > I'm working with an uploader script and am trying to establish the
    > parent directory to which files will be uploaded. However, after the
    > parent directory is set in the code and the file is uploaded, a folder
    > is created 'under' the cgi-bin folder that has the full path name as
    > its title, rather than using that path as the basis upon which to
    > concatenate the rest of the path. The page, when run, says that the
    > file has been uploaded successfully, but when following the link it
    > generates to the file, it cannot be opened, due to a repeat in the
    > path (e.g. www.mysite.com/uploads/uploads/test.txt)
    >
    > Here is the URL for the download for this: http://www.cnctek.com/bizdb-html/download.html
    >
    > Follow this link:
    > Download File Uploader - use "guest" for user name and password


    If that script doesn't work as expected, please consult the
    documentation or the script author.

    If you want to write your own script, and are encountering difficulties
    when doing so, this group may be a good place to ask for help. Btw, you
    may want to make use of the CPAN module CGI::UploadEasy.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Oct 10, 2007
    #2
    1. Advertising

  3. ll

    ll Guest

    On Oct 10, 10:07 am, Gunnar Hjalmarsson <> wrote:
    > ll wrote:
    > > I'm working with an uploader script and am trying to establish the
    > > parent directory to which files will be uploaded. However, after the
    > > parent directory is set in the code and the file is uploaded, a folder
    > > is created 'under' the cgi-bin folder that has the full path name as
    > > its title, rather than using that path as the basis upon which to
    > > concatenate the rest of the path. The page, when run, says that the
    > > file has been uploaded successfully, but when following the link it
    > > generates to the file, it cannot be opened, due to a repeat in the
    > > path (e.g.www.mysite.com/uploads/uploads/test.txt)

    >
    > > Here is the URL for the download for this:http://www.cnctek.com/bizdb-html/download.html

    >
    > > Follow this link:
    > > Download File Uploader - use "guest" for user name and password

    >
    > If that script doesn't work as expected, please consult the
    > documentation or the script author.
    >
    > If you want to write your own script, and are encountering difficulties
    > when doing so, this group may be a good place to ask for help. Btw, you
    > may want to make use of the CPAN module CGI::UploadEasy.
    >
    > --
    > Gunnar Hjalmarsson
    > Email:http://www.gunnar.cc/cgi-bin/contact.pl



    Gunnar,
    Thanks for your reply. I've now got the files to upload (to "cgi-bin/
    upload/" - for some reason I cannot get them to upload to "root/
    upload/". I am able to open the files from the ftp client, although
    when I try opening them via the link created (which turns out to be
    the empty "root/upload/" directory) on the page, I get the following
    error:
    "Not Found
    The requested URL /upload/comm_khicks.gif was not found on this
    server.
    Additionally, a 404 Not Found error was encountered while trying to
    use an ErrorDocument to handle the request. "

    I would like a way to view/open the files within the "root/upload/"
    directory. Thanks for the tip re CGI::UploadEasy.

    Louis
     
    ll, Oct 10, 2007
    #3
  4. ll wrote:
    > On Oct 10, 10:07 am, Gunnar Hjalmarsson <> wrote:
    >> If that script doesn't work as expected, please consult the
    >> documentation or the script author.
    >>
    >> If you want to write your own script, and are encountering difficulties
    >> when doing so, this group may be a good place to ask for help. Btw, you
    >> may want to make use of the CPAN module CGI::UploadEasy.

    >
    > Thanks for your reply. I've now got the files to upload (to "cgi-bin/
    > upload/" - for some reason I cannot get them to upload to "root/
    > upload/".


    I had a look at the script's config variables. Try this setting:

    $parent_dir = "$ENV{DOCUMENT_ROOT}/";

    > I am able to open the files from the ftp client, although
    > when I try opening them via the link created (which turns out to be
    > the empty "root/upload/" directory) on the page, I get the following
    > error:
    > "Not Found
    > The requested URL /upload/comm_khicks.gif was not found on this
    > server.
    > Additionally, a 404 Not Found error was encountered while trying to
    > use an ErrorDocument to handle the request. "
    >
    > I would like a way to view/open the files within the "root/upload/"
    > directory.


    As long as the files are not saved in that directory, you can't
    reasonably be expecting to view/open the files there, can you?

    > Thanks for the tip re CGI::UploadEasy.


    You're welcome. Note, again, that this group is for discussing Perl
    programming, not for assistance with ready-to-use scripts.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Oct 11, 2007
    #4
  5. ll

    ll Guest

    On Oct 10, 7:41 pm, Gunnar Hjalmarsson <> wrote:
    > ll wrote:
    > > On Oct 10, 10:07 am, Gunnar Hjalmarsson <> wrote:
    > >> If that script doesn't work as expected, please consult the
    > >> documentation or the script author.

    >
    > >> If you want to write your own script, and are encountering difficulties
    > >> when doing so, this group may be a good place to ask for help. Btw, you
    > >> may want to make use of the CPAN module CGI::UploadEasy.

    >
    > > Thanks for your reply. I've now got the files to upload (to "cgi-bin/
    > > upload/" - for some reason I cannot get them to upload to "root/
    > > upload/".

    >
    > I had a look at the script's config variables. Try this setting:
    >
    > $parent_dir = "$ENV{DOCUMENT_ROOT}/";
    >
    > > I am able to open the files from the ftp client, although
    > > when I try opening them via the link created (which turns out to be
    > > the empty "root/upload/" directory) on the page, I get the following
    > > error:
    > > "Not Found
    > > The requested URL /upload/comm_khicks.gif was not found on this
    > > server.
    > > Additionally, a 404 Not Found error was encountered while trying to
    > > use an ErrorDocument to handle the request. "

    >
    > > I would like a way to view/open the files within the "root/upload/"
    > > directory.

    >
    > As long as the files are not saved in that directory, you can't
    > reasonably be expecting to view/open the files there, can you?
    >
    > > Thanks for the tip re CGI::UploadEasy.

    >
    > You're welcome. Note, again, that this group is for discussing Perl
    > programming, not for assistance with ready-to-use scripts.
    >
    > --
    > Gunnar Hjalmarsson
    > Email:http://www.gunnar.cc/cgi-bin/contact.pl



    Gunnar,
    Many thanks - that was what it needed - the correct diretory is
    receiving and displaying the files. Also, thanks for the word on the
    group - will look for a group more suitably tailored to this.

    regards,
    Louis
     
    ll, Oct 11, 2007
    #5
    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. Andy

    HTML File Uploader

    Andy, Dec 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    427
  2. Gefster
    Replies:
    1
    Views:
    465
    Chris Bailey
    Jun 18, 2004
  3. BORG

    Picture uploader

    BORG, Jun 25, 2003, in forum: HTML
    Replies:
    1
    Views:
    2,226
    David Dorward
    Jun 25, 2003
  4. Author #1

    Ajax File Uploader

    Author #1, Aug 27, 2009, in forum: ASP .Net
    Replies:
    7
    Views:
    828
    Martin M
    Oct 5, 2009
  5. groupie

    Multiple file uploader

    groupie, Jan 28, 2008, in forum: Javascript
    Replies:
    0
    Views:
    86
    groupie
    Jan 28, 2008
Loading...

Share This Page