2

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

J4N
  • 19,480
  • 39
  • 187
  • 340

2 Answers2

1

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

JamieSee
  • 12,696
  • 2
  • 31
  • 47
  • If it's a text file, then the browser will open it, unfortunately. You may be able to use this method to a 'shortcut' (.lnk file) instead, which will tell Windows to open that file with the preferred application. Only works on Windows, though. – uotonyh Mar 20 '12 at 18:57
  • It was stated in the original message that the user wanted to link to the ORIGINAL file and have all edits made (via a web browser) to only the original file stored on the server... – CheckRaise Mar 20 '12 at 20:18
  • Event the text file isn't opened. I tried file:///D:/test.txt, file://D:/test.txt , file:///D:|test.txt, file://D|/test.txt, ... In all case, the browser shows me file:///D:/test.txt when I've got the mouse over, but nothing happens when I click – J4N Mar 20 '12 at 20:20
  • @J4N You may be running up against browser security. Try adding your site to the trusted sites list through Tools Menu , Internet Options, Security tab, Trusted Sites Zone, Click Sites and then add it. – JamieSee Mar 20 '12 at 21:02
  • Yes, I already tried this, didn't seems to work. How to do it on firefox/chrome/safari? – J4N Mar 21 '12 at 07:21
  • I did some further looking and found another question that covers this topic for IE: http://stackoverflow.com/questions/2904425/file-uri-link-to-local-folder-in-ie7-not-working – JamieSee Mar 21 '12 at 14:48
0

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/

J4N
  • 19,480
  • 39
  • 187
  • 340