Azzera filtri
Azzera filtri

WebApp Using dir to get client directoy

3 visualizzazioni (ultimi 30 giorni)
Dominik Pahlke
Dominik Pahlke il 4 Ago 2022
Risposto: Walter Roberson il 5 Ago 2022
Hey,
i developed an app which is reading a list of images on the client computer and viewing / filtering those.
I am in the process of porting this app to be a web app. At one point I read all image files from a specific dir using
dir([directory '\**\*.png']);
As it turns out when using dir in a webapp the server executes dir on the Server the Webapp is running on not on the client Computer.
Is there a way to get a list of all png files in the set directory of the client computer?

Risposte (1)

Walter Roberson
Walter Roberson il 5 Ago 2022
There is no supported way to do that.
Technically, the ability is (if I recall correctly) supported with restrictions under HTML5, and is implemented by the Chromium engine -- so supported on Google Chrome browser, and just possibly Microsoft Edge browser, but no other browser that I can think of. For Google Chrome, the remote user has to specifically authorize the access. The server kind of sends javascript to the browser in a special way and the javascript gets executed inside a sandbox that authenticates it and checks for user permission before executing the operation.

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by