Hello,
Since there is no way to hardcode a file path as a "value" in the FILE UPLOAD form as stated in RFC1867. I would like to find an alternative to allow multiple uploads. The files always have the same names and paths. Because I am still new to perl my scripting creativity is very limited.

I had an idea that I want to see if it is possible.

Since the name of the FILE fields are named FILE1 FILE2 FILE3 FILE4 FILE5 etc. I thought of having a hash that would contain the file paths of the files I wanted to upload(shown below).Then if the passed value of param("FILE$a")was empty it could look up the stored file path in the hash.

After looking at this it may be I don't require a FILE FIELD INPUT at all and may be just need to hard code all of the file paths anyway.
Any ideas
Thanks
Cal
######################################### for(my $a = 1; $a <= 5; $a++) { my $req = new CGI; if($req->param("FILE$a")) { my $file = $req->param("FILE$a"); my $filename = $file; } } ########################################## my %path_hash = ( FILE1 => C:\My Documents\Online_Bulletin\pg2.html, FILE2 => C:\My Documents\Online_Bulletin\pg3.html, FILE3 => C:\My Documents\Online_Bulletin\_bk.gif, FILE4 => C:\My Documents\Online_Bulletin\img0.gif, FILE5 => C:\My Documents\Online_Bulletin\img1.gif, );

In reply to Uploading Multiple Files by cal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.