Okay, while I'm not exactly sure where you are having problems, I think I can help you out ... When submitting a file upload via HTTP, a multi-part request must be made by the client - For example ...

<form action="/cgi-bin/..." enctype="multipart/form-data" method="post +"> ... </form>

This type of request submits the form field information and the 7-bit encoded file via POST, separated by a boundary separator that delimits these two sections. The CGI parameter from the file field will contain the name of the file, while the file itself must be parsed from the request separately - A lot of this magic is hidden in the init and read_multipart subroutines of CGI.pm, based upon RFC1867.

It should also be noted that the value of the file field form parameter is platform dependent and as such, it cannot be depended upon to return both directory and filename of the uploaded file.

As such, if you are using your own CGI parameter parser, it is more than likely that you are simply not extracting this information from the submitted POST - This is another reason why it is better to use CGI.pm rather than a hand-rolled parser based upon cgi-lib.pm (see use CGI or die;).

 


In reply to Re: Macs and File Uploads by rob_au
in thread Macs and File Uploads by Cody Pendant

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.