get-binary-data not getting the value

psomanathan

New Member
Code:
<HTML>
<BODY>
    <script language="SpeedScript">
  {src/web/method/cgiutils1.i}

DEFINE VAR mfile AS MEMPTR NO-UNDO.
define var ufile as longchar NO-UNDO.
DEFINE VAR cfile AS char NO-UNDO.

ASSIGN

 

 
   mFile =  get-binary-data('UploadFile').

IF uFile <> ?
THEN DO:
  
    cfile = "/tmp/test.pdf".  


   COPY-LOB FROM object uFile TO File cfile .


 
END.

</script>
    <FORM
FORM ENCTYPE="multipart/form-data" action="test.html" METHOD="POST" >
    <input type=file name="UploadFile">
    <INPUT type="submit" value='upload' name="upload">
    </FORM>
</BODY>
</HTML>
mfile is not getting any value not sure am i missing anything...
 
Last edited by a moderator:

Cecil

19+ years progress programming and still learning.
Have you configured the WebSpeed to set the binary file upload limit and path. By default it is 0 bites. I think for unlimited file size you set it to -1.
 
Top