Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Previewing With Local Image Linksby moodster (Hermit) |
on Feb 04, 2002 at 08:46 UTC ( [id://143183]=note: print w/replies, xml ) | Need Help?? |
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,
In Section
Seekers of Perl Wisdom
|
|