How to upload file?

OK - you do a post request…
can you modify the program e3form2 from sysweb3:
from


<INPUT TYPE="SUBMIT" VALUE="Submit with GET">'
to 
<INPUT TYPE="SUBMIT" name="a" VALUE="Submit with GET">'
and
'<INPUT TYPE="SUBMIT" VALUE="Submit with POST">'
to
'<INPUT TYPE="SUBMIT" name="b" VALUE="Submit with POST">'

and run the program …/SYSWEB3/E3FORM2 from your browser and then click on “submit with post” button.
What can you see behind the row “Data” and “Body”?

I see:

Data:
B-FIELD=NONE
b=Submit with POST
WITH_GET_DATA=TRUE

Body:
B-FIELD=NONE&b=Submit with POST

If you see the same, please modify following line…
form


'<FORM METHOD="POST" ACTION="NAT-DATA">?WITH_GET_DATA=TRUE">'-
to
'<FORM METHOD="POST" ACTION="NAT-DATA">'- /* ?WITH_GET_DATA=TRUE">'-

No normally not if using DCOM.

hey eric, after almost whole day debuggging my code, i realised something. when i changed my POST in form to GET statement, then it can work properly.

why it happen like this? i dont face such problems when i was using SYSWEB. is this some sort of bug?

-joel

Eric i see:

[color=“blue”]Data:
B-FIELD=NONE
b=Submit with POS
WITH_GET_DATA=TRUE

Body:
B-FIELD=NONE&b=Submit with POS[/color]

Again, if u notice the “T” is missing from “POST” :roll:

Yes this is a Bug - but this seams to be solved with the current NAT622 version - I can’t reproduce.

Work arround:

add a
<INPUT TYPE='HIDDEN' NAME='HIDDEN' VALUE='nothing'>
after your 
<INPUT TYPE='SUBMIT' ...

This should work until you get your copy of NAT622.

Thanks for your help!

Cool man! Thanks a lot! You are my saviour!!!

If you have a look at the http specification POST and PUT result in a complete different communication (you see with NAT-DATA).

With NAT62 new features have been added like:

  • The in page size (containing variables) is no longer limited to ca. 30 000 Bytes.
  • Support parameter settings at the URL (QUERY_STRING) together with POST.
  • Incoming data no longer needs to be of mime type ‘application/x-www-form-urlencoded’ (check is no longer part of the Web Interface Server Extension, but will be check - for compatibility reasons - at W3INIT).
  • Data transfer is no longer limited to alphanumeric data, Binary data can be transferred from e.g. multipart-form-data upload from a Browser, including pictures or delivering pictures e.g from the Natural resource directory.

These features made is necessary to change the internal handling of parameters … :oops: