OE 10.1C
IIS 6.0
Tested on IE11 and FF 41.0.1
I have the follow webspeed program, called upload2.html:
<!DOCTYPE html>
I think this is more of a browser thing than a webspeed thing.
On the browser, there are plug-ins that will state what is being sent out on the post. Might want to try that to insure it is happening at the browser.
Else the answer you already have.
There is nothing wrong with the browser(s), webspeed need to parse the request payload and I think the issue might be in the cgi messenger that somehow gets confused about a multi-part post with no file content (content-type seems to be set to binary/octet-stream just no content follows till next boundary). The result is an incomplete variable list that gets sent to the 4gl side.
However that might well be a non issue, you already got the solution to move the hidden fields on top and then act only if you get a submit/file set... the whole point there is to upload file(s), if nothing gets uploaded one my wonder why do you care for the rest of the form fields? :)
Hello Marian,
The example that I posted was simplified, I have a form with several data, with the option to the user for upload some file. The user can choose not to upload file but of course wants to see reflected other changes.
I have 3 workarounds:
1.- Put the input type file at the very last of the form. That could have a problem for usability, design.
2.- Separate the input type file on a different form. Same problem as #1.
3.- This is -at the moment- my final solution: I made a javascript called on form submit; it check for the input type file value, if is empty removes the input type file tag from the form.
My workaround works fine, but I don't like to use this kind of tricks on the code, that was I was looking for help to the experts ;) I don't know, maybe some magical IIS setup or a mistake on my code.
On the {&OUT} WEB-CONTEXT:FORM-INPUT I can see the values correctly, with or without file selected. The odd thing is with {&OUT} WEB-CONTEXT:GET-CGI-LIST("FORM") only firsthidden,thename,filename is show when file is not selected, If im not wrong get-value use that commands.
And you are correct, the content-type on the file when is not selected says:
Content-Disposition: form-data; name="filename"; filename=""
Content-Type: application/octet-stream