Open a shared folder on a domain from a web page - html

Thanks for you help in advance,
I am building a very simple web page , (a single page) with links to e.g bbc.com, cnn.com etc, (this works fine)
now i need to create diff links on that page to various location on our internal shared drive, which is already map to user pc from the server (running win server 2008).
wen users who's systems are not connected to our domain try to access the shared drive (after a shut down) they are always prompted for username and password which then give them access to the drive.
my ques now is how do i create this link on my html page so that when users click it. its opens (\10.10.0.1\k\Shared\HR) in windows explorer and not in the browser which it does now.
<li data-tags="Logo Design"><img src="images/portfolio/thumbs/image(5).jpg" alt="Illustration" />
this is the line i use.
i have read this links but they dont look to ans my ques, or i dont just understand what to do,
Opening windows explorer via link
Open ClickOnce application deployed in shared folder by a web browser
Access a shared folder from a machine not in the domain
https://stackoverflow.com/questions/7249017/open-file-w-test-in-explorer-exe-not-in-chrome-or-internet-explorer-any (this looks like what i need but i don't know where to fit in the code there)
How to launch an EXE from Web page (asp.net)
am doing this on my system but will transfer it to the server, and will place a shortcut to my index file on users desktop.
Thanks for you help, I hope I have provide all the info needed to help me with this.
we all use chrome cause of google drive

This will not be accomplished by any default browser configuration that I am aware of, as using file:// references would typically cause the browser to try to launch the file. Maybe search though Chrome plug-ins to see if something is available there to override default browser behavior.

Related

link to a file on windows shared drive from an iPhone

I want to send an HTML email with link in them. The link should open files from a windows shared drive. The users will already be logged in to the network via VPN.
I've tried
Test Report
This works fine when opening on a PC but I can't figure how to open this in an iPhone although the users accessing the network thru a VPN client on their phone.
I'm open to use any third party solution
This link is for IPADs, but it should work with Iphone as well:
https://discussions.apple.com/thread/3978480?tstart=0
According to Apple's forum, you need to use some sort of third party software to access files, like filebrowser (link in the forum page). Personally, I use filebrowser and it works fine for me. It works kind of like WinSCP for windows. It pulls data from a Server (your vpn) and allows you to download and modify on your phone. It is cross platform compatible, so it is great if you have multiple devices. I have heard that FileExplorer Pro is exceptional, but I have not tried it. Here is the link to fileexplorer on the app store:
https://itunes.apple.com/us/app/fileexplorer-pro/id499470113?mt=8
EDIT:
As far as I know, this is not possible from any mobile device. Best bet is to send the file through a secure email, such as ProtonMail.
iOS is less flexible when it comes to file management and file associations, so there’s less you can do with these files. However, you can still open a video file directly from your shared folder and play it on your device or access other media files in a similar way. You could also use the “Open In” feature to open a file in a specific app.
The Windows network file sharing protocol is known as CIFS, which is an implementation of the SMB protocol.
this guide may help you. this is not exact answer about what you want though. https://www.guidingtech.com/27119/access-shared-windows-iphone-ios-wifi/

Open local files(file://) using Chrome

I have an page with some forms. All the links work fine in IE. They open in a new tab nicely when the hyperlink is click by the user; however, I realized that when Chrome is use the link doesn't open. I keep clicking but nothing opens. The only way of opening the file is copying the hyperlink, opening a new tab in Chrome, paste and go.
Form1
Is this something that browser do? Because I tried it with FireFox and doesn't work either?
It there a way of going around? without installing anything in the browser? Because my user loves Chrome.
Thank you in advanced for the responses.
You can't access to files outside your server or "SandBox", sandbox include the files that user push to the browser or to your server.
If the access from browser to a pc files from web pages was possible, it would be a security problem.
The answer is that you can't with your approach and more importantly you shouldn't. Chrome behavior is in fact the right behavior and it protects you from having malicious users and/or scripts accessing your local resources.
The FILE protocol will access local or defined network named resources which will not be available to a remote user that visits the same page. In other words, you may have outsideserver mapped as a network resource/drive but someone else will not (This does not apply to IPs)
Here's what you can do:
Move the code to a server side script(php, asp, etc) and stream the file back out. Found a quick example here on SO. I did not verify it though. Streaming a large file using PHP
Install a webserver on outsideserver and map a new site to the shared folder. You can then reference it via http (http://outsideserver.com/form1.pdf)
Use the below extension for chrome. It will work.
Enable local file links
Below both options are working and tested.
Link 2
Link 3

Using File:/// Protocol Links with Javascript API for Office

Background
I'm writing an excel app using the Javascript API for Office. (Office 2013). Inside that app, I have several links to folders on my computer/server, which I want to access from the app using the file protocol.
I've tested the file protocol with a dummy HTML file, using this link:
C:\Users\User\Desktop
It works perfectly, opening up the Desktop folder. I've also tested using a networked drive, and it works as well.
Problem
When I add this dummy link into an HTML page in my Excel web app, clicking on it does nothing. When I right click -> Open, IE11 opens a new instance (which doesn't happen with mailto: links), and asks if I'd like to give permission. After I do give permission, the folder is opened.
Goal
I want a single left click to open the folder location without the permissions box ever popping up. Worst case, I want to be able to have the user open a dummy link once during app setup and then once permission is given avoid having to right click -> open.
Question
How can I accomplish the goal here? Is Office just locking down the links?
Update
The primary issue I've found out is that the site I'm hosting the app on wasn't a trusted site. Links using the file protocol only work on intranet and trusted sites. So the only question now is whether the Office store location is trusted.
The problem here lies in the way that Office Apps work. A manifest file is stored with the Office Store, and that is what users download. That manifest points to a server location that the app developer specifies, and that is the location from which the app is served. That is the location which must be added to Trusted Sites in IE.
Therefore to get the File Protocol working smoothly, I'd need to include instructions with my App on adding my hosting server to the Trusted Sites domain, and I'd have to avoid ever changing domains.

Linking to local content in a web application

I am working on a replacement application to a legacy application. Due to certain design limitations of the legacy application, 'attachments' are stored as a String path in our database (generally files stored on a windows shared drive). The legacy application can then 'open' the attachments by opening a windows command shell and executing the given path.
The legacy (Oracle Forms) application is being phased out by a JSF based J2EE web application. The new application needs to be able to 'open' or link to these legacy attachments somehow. Is this even possible? I have attempted to use file:// URLs, but there are lot of caveats with using them. They only work on remote hosts in IE, firefox/chrome (and other modern browser I assume) prevent local file URLs.
Working only on IE is something that can be lived with for this particular feature. I further ran into an issue with file paths with spaces. For some reason if IE encounters a filepath with spaces in it, say
C:\Documents and Settings\user123\My Documents\testing\someFile.txt
it refuses to open that link. The browser automatically replaces the spaces (' ') with its URL Encoded '%20'.
The associated link I am attempting looks like:
link
Is there something simple to this I am missing? Or is there any easier way of doing this?
I wasn't quite sure what to tag this as so feel free to retag as necessary.
After some extensive testing I have reached the following conclusions:
Only IE will open file:// links that are on a page from a remote host, Other browsers will block them outright and nothing will happen when a user clicks on them.
IE will only open file:// URLs that point to a file that resides on a network drive
If a user clicks on a file:// link pointing to a file on the user's local drive, nothing will happen and they will get no error.
If a user clicks on a file:// link that points to a network file it will open in the browser, if possible.
If the file:// url points to an invalid location (unmapped network drive, file on a network drive that doesn't exist), Windows will show a popup error.
Spaces in the file path needs to be URL encoded with %20
Hopefully this helps someone else out who's looking for information on file urls.
If you use double quotes (") around the path to the file (you will probably need to URL encode these as %22), windows will be OK with the full path:
link

How do I create a link to a saved html page on my computer?

I'm working on a web application that caches html pages and saves it on the user's computer. I want to create a link, so that the user can click on the link and access the cached webpage.
Following is my link to a cached page:
BBC
When I click on the link, nothing happens. I'm not even getting any error.
Can someone please suggest how to create a link to a cached html page?
First of all, not all browsers handle local files equally, indeed, not all computers will be running windows or have a C: drive. Secondly, you don't have much control over a user's cache. Cached pages are usually handled by the browser automatically. You can use headers to specify how a browser ought to cache files, but it's not even required to do so. You can read the W3C recs on caching for more information.
It's unclear what you're trying to do here, but it sounds like it might make more sense for you to use HTML5 local storage or offline files than trying to mess around with their file system directly. The security model of most browsers is such that web apps don't interact with local files, which may be why it's not working for you with your current setup. Dive Into HTML5 has a good overview of HTML5 local storage and offline pages.
Edited based on comment below:
Most browsers' security settings won't let a page on a website access files stored locally. Only locally saved files can link to other locally saved files. Therefore, if the page with a link is on a website, your link won't work. Try creating a link to your file from another locally stored file and see if that works.
Instead of providing the .html extension in the main page where you provide the link you should do something as below:
< href="file:///C:/Users/xxx/yyy/bbc">BBC</a>