MozillaZine

WebDav : launch OOo to modify a document from Firefox

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
marinew
 
Posts: 6
Joined: October 31st, 2007, 1:16 pm

Post Posted January 2nd, 2008, 2:54 am

Hello,

I'm using a WebDav repository to access some documents (through Alfresco WebDav feature). I have a web application that expose http links to a file WebDav url, and I would like OpenOffice to automatically launch and open this remote file for modification, when I click on this link in Firefox.
The URL looks like this : http://server:port/alfresco/webdav/myDocument.odt

Today, when I click on the link in Firefox, I have to choose between "open with" or "download". If I choose "open with OpenOffice", Firefox download the file in Internet temporary folder, and then launch OpenOffice, so I can't modify and save it back automatically to the WebDav repository, as it is a local copy.

I read here (http://ucb.openoffice.org/docs/ucp-ref/webdav-ucp.html), that I could use an URL that looks like this : vnd.sun.star.webdav://server:port/alfresco/webdav/myDocument.odt
But when I try to click on this link in Firefox, it gives me the following error (in french, sorry !) : "Firefox ne sait pas ouvrir cette adresse car le protocole (vnd.sun.star.webdav) n'est associé à auncun programme"

Just a precision : I did the test : OpenOffice is able to directly open a remote file from WebDav and save it back automatically.
- Either by launching OpenOffice with file Webdav url as parameter : soffice.exe http://server:port/alfresco/webdav/myDocument.odt
- Either by :
- modifying an option in OO : menu Tools > Options > OpenOffice.org > General > Check "Use openOffice.org dialog boxes"
- and then menu File > Open... > File name : http://server:port/alfresco/webdav/myDocument.odt
So the problem is really to tell Firefox the way to open this URL.

Does anybody has an idea about how to solve my problem ?
Thanks.
Marine

steviex
Moderator

User avatar
 
Posts: 28902
Joined: August 12th, 2006, 8:27 am
Location: Middle England

Post Posted January 2nd, 2008, 3:15 am

Moving to Web Development....

Try the suggestions here.... http://kb.mozillazine.org/Register_protocol
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -Albert Einstein

Please DO NOT PM me for support... Lets keep it on the board, so we can all learn.

marinew
 
Posts: 6
Joined: October 31st, 2007, 1:16 pm

Post Posted January 2nd, 2008, 5:23 am

Thanks for your suggestion...

If I go that way (registering a specific protocol), I have another problem : the Open Office default directory varies depending of its version (C:\Program Files\OpenOffice.org 2.2 or C:\Program Files\OpenOffice.org 2.3 or ...).
=> How can I point to the right directory, in Windows Registry and in Firefox about:config, without having to look at each user computer specifically, and without having to modify it every time a new Open Office version is installed ?


Or : isn't there a way for Firefox to detect that if a link (with http/https protocol) point to a webdav repository, then it has to launch default associated application, rather than downloading the file ?


Thanks...

(users will work on Windows and Mac)

omigeot
 
Posts: 2
Joined: July 1st, 2008, 5:28 am

Post Posted July 2nd, 2008, 12:56 am

marinew wrote:Or : isn't there a way for Firefox to detect that if a link (with http/https protocol) point to a webdav repository, then it has to launch default associated application, rather than downloading the file ?


I don't think there is any easy way to detect a WebDAV URL. One workaround would be to tweak alfresco to make it use a different URL-scheme for WebDAV links. Like "webdav://" instead of "http://". And then register that scheme accordingly.

marinew
 
Posts: 6
Joined: October 31st, 2007, 1:16 pm

Post Posted July 2nd, 2008, 6:38 am

Hi,

Thanks for your reply. I finally choose to use "DownloadWith" firefox extension.
See details here (in french !) : http://forums.alfresco.com/fr/viewtopic ... t=20#p6313

omigeot
 
Posts: 2
Joined: July 1st, 2008, 5:28 am

Post Posted July 3rd, 2008, 12:59 am

marinew wrote:in french !


Voilà qui me plaît bien :)

(apologies to non-french-speakers, but this was pointless anyway)

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 0 guests