Hello,
Is is possible to open files that are stored locally in web browser? I have tried using JS and Http request handler but somehow it doesn't work. Can anyone help me with this?
Hi
That would only work if your local drive is accessible from the internet, assuming you run OutSystems in the cloud. Consider using a tool like NGROK to expose your local drive to the internet in a secure manner.
https://github.com/inconshreveable/ngrok
-- Daniel
I am working on application which is On premise
If you work on Prem, why not use a network share to share files between your computer and OutSystems? Using the FileSystem Forge component you should then be able to access the files.
This worked actually but I am able to access on D-drive where platform server is installed and not the other folders? Are there any limitations to this?
Hi Subham,
Given you run OutSystems onpremise, I think the limitations are defined by your IT department configuring network access to the right folders on the right servers.
Not really an OutSystems issue, to my knowledge (I am not a network/infrastructure specialist).
Opening local files directly in a web browser through JavaScript and HTTP requests is restricted due to security measures designed to prevent unauthorized access to a userās file system. However, there are sanctioned methods for working with local files, one notable approach being the Local File System API. This API facilitates more direct interaction with file systems while adhering to security and privacy standards. More info on this is available here.
Opening locally stored files in a web browser may be limited due to security measures implemented in modern web browsers. This is done to protect users from potentially malicious activities, such as executing scripts or downloading malicious content from the local file system. However, there are several ways to get around this limitation. One way is to use the <input type="file"> tag to create a file picker element that will allow the user to select a file from local storage.