Title: launchURL Front Call Post by: Gary C. on May 04, 2025, 03:21:04 pm Hi
We have finally made the move from FGL 3.21 to 5.01 but have noted a behaviour we cannot explain when using the launchURL front call in conjunction with ui.Interface.filenameToURI to display stored documents. We have a centralised function to do this as all documents are stored in a single document archive. The function is as below: Code
For the time being we are able to run our codebase using FGL 3.21 or 5.01, hence the check for the front end type. The above works well when the filename of the document has no spaces, e.g. image01.jpg, but fails when there are spaces. For example, a filename of "Meeting Report.pdf" will fail. The result is the following URI, for which we get a bad request response in the browser: https://app.alsico.co.uk/gas/ua/ft/6f73f925533f0d5470e57ba6ea7b762a/fgl-files/82966/Meeting%20Report.pdf?t=1746363820;s=461534;charset=UTF-8 However, if we replace the spaces with an underscore, i.e. "Meeting_Report.pdf", this results in a URI such as below, which works: https://app.alsico.co.uk/gas/ua/ft/831139bc472031110b9fe19ea07f7add/fgl-files/82994/Meeting_Report.pdf?t=1746363908;s=461534;charset=UTF-8 Can anyone see any issues in the above code? Though the workaround is fine, it would be better for us not to have to manipulate the file name. Thanks in advance Gary Title: Re: launchURL Front Call Post by: Leo S. on May 04, 2025, 11:46:07 pm Hi Gary, works for me with FGL 5.01.02 and httdispatch 5.01.01 ... see attached.
Try at your side and if this doesn't work with your env contact the support. I'd like to point you for displaying PDF's "inlined" to a simple webcomponent I came up with: it doesn't open a 2nd tab and you could integrate more seamless into your workflow. Since 4.x it works painless in GBC and GDC (exception safari mobile: only the 1st page of the pdf is displayed as an image because it seems an iframe limitation of safari mobile). Previously pdfjs was needed to render PDFs in a Genero Form, nowadays browsers are capable of displaying their own GUI for showing PDFs in an iframe. See https://github.com/leopatras/wc_simplepdf Regards, Leo Title: Re: launchURL Front Call Post by: Reuben B. on May 05, 2025, 12:10:08 am Gary,
You are light in details on what the front-end is, but is this a possibility https://4js.com/online_documentation/fjs-gas-manual-html/#gas-topics/c_gas_mode_proxy_fcgi_spaces_in_filenames.html Reuben Title: Re: launchURL Front Call Post by: Gary C. on May 05, 2025, 01:11:12 pm Hi
Thanks Leo, I'll look at your component as we may have a good use case for this. Reuben, thanks, that was the issue. We are using Apache 2.4.52 on Ubuntu, but our proxy.conf file was incorrect and had the pre 2.4.11 settings. Gary |