/* This example shows how to retrieve the data from a file passed on a given
request, and save it as a file with the same name to the WebSpeed's working directory. Note that 'filename' is the name of the field in the form posted. */ DEFINE VAR mFile AS MEMPTR NO-UNDO. DEFINE VAR cfile AS CHAR NO-UNDO. /* 'filename' refers to the name of the field in the form. get-binary-data returns the contents of the file associated with the form field named 'filename'. */ ASSIGN mFile = get-binary-data("filename"). IF mFile <> ? THEN DO: /* if we got a valid pointer, save data to file. The value of the field 'filename' is the file name posted */ ASSIGN cfile = get-value("filename"). COPY-LOB FROM mFile TO FILE cFile NO-CONVERT. END. |