I need to let users of an application open a folder by clicking a link inside a web page. The path of the folder is on the network and can be accessed from everywhere. I'm probably sure there is no easy way to do this, but maybe I'm mistaken?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- React Native Inline style for multiple Text in sin
You can also copy the link address and paste it in a new window to get around the security. This works in chrome and firefox but you may have to add slashes in firefox.
Does not work in Chrome, but this other answers suggests a solution via a plugin:
Can Google Chrome open local links?
Using file:///// just doesn't work if security settings are set to even a moderate level.
If you just want users to be able to download/view files* located on a network or share you can set up a Virtual Directory in IIS. On the Properties tab make sure the "A share located on another computer" is selected and the "Connect as..." is an account that can see the network location.
Link to the virtual directory from your webpage (e.g. http://yoursite/yourvirtualdir/) and this will open up a view of the directory in the web browser.
*You can allow write permissions on the virtual directory to allow users to add files but not tried it and assume network permissions would override this setting.
The URL
file://[servername]/[sharename]
should open an explorer window to the shared folder on the network.make sure your folder permissions are set so that a directory listing is allowed then just point your anchor to that folder using chmod 701 (that might be risky though) for example
make sure that you have no index.html any index file on that directory
Do you want to open a shared folder in Windows Explorer? You need to use a
file:
link, but there are caveats:file://server/share/folder/
).file://///server/share/folder
) and the user has disabled the security restriction onfile:
links in a page served over HTTP. Thankfully IE also accepts the mangled link form.file:
link in a page served over HTTP.