Example: Using the fgl_upload function with TextField with FileUpload
LYCIA
4GL:
MAIN DEFINE f1 CHAR(100) OPEN WINDOW w1 WITH FORM "form_upl" ATTRIBUTE(BORDER) INPUT BY NAME f1 CALL fgl_upload(f1, fgl_basename(f1)) IF os.Path.isfile(fgl_basename(f1)) THEN DISPLAY "File is on app server" ELSE DISPLAY "FALSE to upload" END IF END MAIN
Form:
<?xml version="1.0" encoding="UTF-8"?> <form xmlns="http://namespaces.querix.com/2015/fglForms" > <form.rootContainer> <CoordPanel preferredSize="414,135" minSize="414,135" visible="true" enable="true" fieldTable="formonly" identifier="rootContainer"> <TextField classNames="FileUpload" location="168,22" preferredSize="216,22" visible="true" enable="true" fieldTable="formonly" identifier="f1"/> <Label isDynamic="true" text="Upload Path to Progs:" location="0,22" preferredSize="168,22" visible="true" enable="true" fieldTable="formonly" identifier="lb2"/> </CoordPanel> </form.rootContainer> <form.screenRecords> <ScreenRecord identifier="FormOnly" fields="f1"/> </form.screenRecords> </form>