[ic] (no subject)
firfin at earthling.net
Wed Sep 3 08:38:39 EDT 2003
Hi fellow ic-users,
I got -i think- a small problem that i dont know how to fix. Something minor i think. I'm using some code for upload (from the archives. File uploading works fine. I have only one problem the file gets saved under a static name.
This means that when a new file gets uploaded, the old one gets clobbered.
I've tried using the value-tag with the filename after the outfile= to dynamically define the name but that doesnt work (value doesnt get interpreted as a tag.
I also tried a bit of perl to try and rename the static name to something but that doesn't seems to do anything ... at all.
This i sprobably because perl is running in safe mode. Is it wise to make perl run 'unsafe', how would i do that (as a last resort off course)
Basically the question is:
How do i save a (uploaded) file to a non-static filename?
This is the code i use atm:
[if type=explicit compare="[value-extended
Uploaded file name: [value-extended name=uploaded_file]
zonder extended naam : [value name=uploaded_file]
zonder name= : [value uploaded_file]
Is newfile a file? [value-extended name=uploaded_file yes=Yep no=Nope test=isfile]
Write with indication: [value-extended name=uploaded_file
outfile= upl/uploaded.outfile <--------------------------This i want to change
[perl] rename "upl/uploaded.outfile" , [value uploaded_file] [/perl]
[tmp result][L]No file upload was specified.[/L][/tmp]
<form action="[process-target]" method="POST" enctype="multipart/form-data">
<input type="hidden" name="mv_session_id" value="[data session id]">
<input type="hidden" name="mv_todo" value="return">
<input type="hidden" name="mv_nextpage" value="@@MV_PAGE@@">
[L]File to upload[/L]:
<input type="file" name="uploaded_file">
<input type="submit" name="mv_check" value="[L]Upload file[/L]">
[set [L]Upload file[/L]]
Sign-up for your own personalized E-mail at Mail.com
CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
More information about the interchange-users