63
Views
7
Comments
Open files from local drive storage in web browser
Question
Application Type
Reactive

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?

2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

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

2022-12-09 04-50-17
Shubham Doshi

I am working on application which is On premise

2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

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.

2022-12-09 04-50-17
Shubham Doshi

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?

2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

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).

2019-01-07 16-04-16
Siya
Ā 
MVP

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.

UserImage.jpg
Jaslene Coleman
AI Generated

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.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.