Just upgraded our Dev servers to GAS 3.20.15 and the GBC is complaining the "Style=FileUpload has been deprecated Use fgl_getfile(). We use fgl_getfile after we get the windows file location using the input from the edit box.
I am wondering if there is a work around for this process or whether my thinking is still in version 2.X.
There's no workaround that I am aware of.
We use a button edit in the form:
buttonedit f002 = formonly.file_src,required,not null,image="DownloadFolder",action=uploadfile;
and the corresponding action will be along the lines of, with some error handling of course:
on action uploadfile
call ui.Interface.frontCall("standard", "openfile", ["", %"Excel Files", "*.xlsx", %"Upload File"], file_src)
if file_src is not null then
call fgl_getfile(file_src, file_dst)
end if
There is a page in the 3.0X GAS docs that explain this. That page does not appear in 3.1X or later docs and it probably should, I have asked for it to be reinstated.
Gary has it right. There needs to be an openFile front-call followed by FGL_GETFILE. This is the cross platform solution for all front-ends, rather than having IF gdc do this ELSE IF Web do something different.
Essentially in a browser environment, you cannot have a standalone FGL_GETFILE(source filename, destination filename) where the source filename variable is coded by the developer without any user input. For instance the equivalent of FGL_GETFILE("/etc/hosts",...), FGL_GETFILE("C:/<guess>/password.txt",...) etc, browsers simply do not allow to happen . You have to force the user to choose a file via the openFile frontcall. FGL_GETFILE then puts the chosen file in the desired destination.
Reuben