Ok, let's see if I understand the concept: the idea is that while previewing, the image is kept locally on the client computer and it's only after actually submitting it using
CGI->upload() that it gets uploaded to the server?
I think it might be possible to get this to work using some heavy JavaScript wizardry to snatch the file name from the upload control and modifying the the HTTP request that gets sent to the server so that the file doesn't get uploaded, but the filename does. It's been several years since I did JS stuff however, so don't take my word for it.
If on the other hand your relying solely on CGI.pm and no client-side scripting, I'd say that it wouldn't work. The file path/name using CGI->upload() is not the path to the file on the client, so you wouldn't be able to use that. You could do it by letting your users hand-type the path into a text box and using that input to build the preview page, but that's not really user-friendly.
Cheers,
-- moodster
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.