Hello, long-time lurker, first time poster here. I've been having an issue with my CGI script to upload files to a web server. I think that I may have a handle on what the issue is, but I'm not quite sure.

I don't have a great grasp of technical definitions, so I'll try to explain what's happening. I have a CGI script that prints an html form that takes in a few parameters, which recently includes a "file" input. It then passes the information to another CGI script to validate the information, which then gets passed to yet another to post everything. This is mostly legacy code, and input data comes from many different places. What I am running is mostly a slightly modified version of this excellent script: I need a simple web upload script. The major difference is that there is no email that is sent.

The file is getting created in the correct directory, but there is never any data passed along. I've been afraid that passing the file two times has somehow transferred the data from being a file to just the file title in a string. Does anyone have any thoughts? I can provide any code examples if people would like.

EDIT: The issue, I eventually learned, is that files need to be passed from a form with "post" rather than "get", as everything else in this package runs. Not a very exciting answer, but using "get" will not pass along any of the data.


In reply to Issue with Passing Files? by Hermano23

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.