Your usage of the CGI::Upload module in your code appears to be correct, although you should incorporate the binmode action recommended by dws above. Similar examples showing the usage of this module can be found on this site here and here.
- Could it be something to do with Mime types ? I'm not sure what to do with this method: mime_magic('/path/to/mime.types'). Should I give this method a list of valid mime types?
No, the
mime_magic method is for the specification of an alternate MIME types file if you are finding the core set supplied by
File::MMagic too limited when using the
mime_type method - If you are not using the
mime_type method to verify the MIME type of uploaded files, the
mime_magic method can be safely ignored.
If you are still experiencing problems with this module and your web server error logs are unrevealing, feel free to drop me an email and I'll see if I can replicate and solve this problem with you.
Update: /msg-ed Bgorman with email contact details.
perl -le "print+unpack'N',pack'B32','00000000000000000000001010001110'"
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.