[ic] Extended Value Access and File Upload

818 Singles Admin interchange-users@interchange.redhat.com
Tue Jan 29 07:06:01 2002


Hi all,

Extended Value Access and File Upload...

I see a post above on this topic, it received no responses.  I will try w/ a
little more detail.  1st I will show some code/output, questions are at the
bottom.

I'm building an online dating site and need to use this feature so members
can upload their picture.

Here is the code I have:

uploadpicture.html

<FORM ACTION="[process-target]" METHOD=POST ENCTYPE="multipart/form-data">
   <INPUT TYPE=hidden NAME=mv_todo VALUE="return">
   <INPUT TYPE=hidden NAME=mv_nextpage VALUE="test">
   <INPUT TYPE=file NAME="newfile">
   <INPUT TYPE=submit VALUE="Upload Picture">
   </FORM>

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>

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

This code comes directly off the Interchange Developers Resource page:
http://interchange.redhat.com/cgi-bin/ic/docfly.html?mv_arg=ictemplates10%2e
08

I see some obvious errors such as Write the file being blank and c:\
included in the file name.  I don't believe the image has been written
although it reads "written".

An earlier post
http://interchange.redhat.com/archive/interchange-users/2001/msg10645.html
shows this to be the "fix":

#############
Yes, this is known. The fix is in CVS. I think we are doing a release
soon... You need to add this:

	$data{$file_fields[$i]}->[0] =~ s:.*\\::;

below the similar line stripping to a / in bin/interchange.

##############

I sent this to my sysadmin and he says it has been done, although things
still look the same.

Unlike the post here:
http://interchange.redhat.com/pipermail/interchange-users/2002-January/01689
5.html, I don't find the image to even be uploaded.

#1. Has anyone used this feature successfully, if so, can you help?
#2. How do I define the upload directory?

Thx much, sorry if it's long, I tried to be thorough.

Jim.