[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Extended Value Access and File Upload
> test.html
>
> <PRE>
> Uploaded file name: [value-extended name=newfile]
> Is newfile a file? [value-extended name=newfile yes=Yes no=No
> test=isfile]
> Write the file: [value-extended name=newfile outfile=junk.upload]
> Write again with indication: [value-extended name=newfile
> outfile=junk.upload yes="Written." no="FAILED"]
> And the file contents: [value-extended name=newfile file_contents=0]
> </PRE>
outfile should include a path relative to your catroot, eg
outfile=images/junk.upload
>
> Here is the output on test.html:
>
> Uploaded file name: C:\818\3.jpg
> Is newfile a file? Yes
> Write the file:
> Write again with indication: Written.
> And the file contents: C:\818\3.jpg
I see some obvious errors such as Write the file being blank
I think you need yes=1 and no=0 to return something.
> and c:\ included in the file name.
I don't see that as wrong. This is just the name as passed from the form. I
use a regex to get the name from the full path, like you included in your
message.
..
#1. Has anyone used this feature successfully, if so, can you help?
Yes it works fine for me.
#2. How do I define the upload directory?
see above. afaik, in a default install using makecat you get a symlink
between <catroot>/images and the images folder in html space.
good luck!
Jonathan
Webmaint.