MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

value-extended question




 Hi...
I've been trying to figure out the [value-extended] tag for uploading a
file...
there is an example in the docs, and i tried them 'as is'....the outfile,
junk.upload, gets created in a directory but with 0 bytes...
i dont know if its a unix permission thing, or an error in my part, but
since the code i used was exactly copied from the docs, i dont understand
where the error is....below is the code from the docs that I am refering
to....
Please, any help will be greatly appreciated....maybe a sample code that
works?
p.d: i tried looking this up in the mail archive, but htdig gave me an
error......
regards and thanks


    <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=hidden NAME=testvar VALUE="value0">
    <INPUT TYPE=hidden NAME=testvar VALUE="value1">
    <INPUT TYPE=hidden NAME=testvar VALUE="value2">
    <INPUT TYPE=submit VALUE="Go!">
    </FORM>

The [value-extended ...] tag allows access to all of these things. If you
put on the test.html page and use with the above form you can see how it is
used:


    <PRE>
    testvar element 0: [value-extended name=testvar index=0]
    testvar element 1: [value-extended name=testvar index=1]
    testvar elements:
     joined with a space:   |[value-extended name=testvar]|
     joined with a newline: |[value-extended
                                joiner="\n"
                                name=testvar
                                index="*"]|
     first two only:    |[value-extended
                                name=testvar
                                index="0..1"]|
     first and last:    |[value-extended
                                name=testvar
                                index="0,2"]|
    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=1]
    </PRE>





Search for: Match: Format: Sort by: