J4N
J4N

Reputation: 20717

"Open a file" located in a network share from an html page?

I've an ASP.Net MVC website which manage some business logic for an entreprise.

For one task, I've to make them edit a file(photoshop file). They have a samba access to it.

How can I make them OPEN this file(and not download a copy and work on the copy)? I need them to edit this file and save their changes directly in the original. And I need that it opens the file with the program associated with this file.

It's for a small group of administrators, so it's not a big deal if I need to put the website that generate those pages in trusted website or something like this.

I tried to put a <a href="file://D:\test.txt"/>test</a> but it doesn't seems to work.

How to do this? Is there a special way to generate this in asp.net?

I'm open to all suggestion.

It has to work at least with safari/mac, windows and other browser are bonus

EDIT I made it works on IE(Security settings + indicating a network path), but most users which will use this will be on safari/firefox :/ any idea?

EDIT: What about putting an url like: myProtocol://someParametersForMyFile and having an application on the client machine able to load myProtocl links? Something like magnet links

Does anybody knows how it is called? I found this: http://www.macosxautomation.com/applescript/linktrigger/index.html But I'm not sure it can't open a any file

Upvotes: 2

Views: 6037

Answers (2)

J4N
J4N

Reputation: 20717

I ended doing an applescript, which is capable of handle custom URL, then the applescript read the parameter in the url and does the appropriate copy.

Source: http://applescript.tv/linktrigger/

Upvotes: 0

JamieSee
JamieSee

Reputation: 13010

Try <a href="file:///D:/test.txt"/>test</a> for a local file. For a share on a remote machine use <a href="file://MyServerName/MyShareName/test.txt"/>test</a>.

Upvotes: 1

Related Questions