WebDav and working with Alfresco as network drive

cancel
Showing results for 
Search instead for 
Did you mean: 
Tomasz
Member II

WebDav and working with Alfresco as network drive

Hello

I have Alfresco 7.1 with SSO using autorization header mounted as network drive in Windows. It is used by me and other users to share MS Office files, PDFs, etc, at first it worked using SMB/CIFS protocol but since that protocol was removed in Alfresco version 6 we moved to WebDav protocol. It works in most cases well, but quite often users report probles with saving files opened with Office when user has to save file under new name instead of just saving the original file.

After setting logs to level debug for webdav and analysing code I managed to understand that Alfresco loses lock on opened file and Word/Excel will still think that lock is still enforced and will try to send LOCK Refresh request. This will end in error because RFC for WebDav states that lock refresh cannot create new lock under any circumstances (even if new LOCK request would succeed in same situation).

Some will say that in that case we should use Alfresco Office Services endpoint (/alfresco/aos) which is created to work with MS version of WebDav protocol. I've tested same scenario with AOS and it works fine, but with that endpoint Acrobat Reader has problem opening PDF, drag&drop was a problem (I know in AOS 1.6 it was fixed), Excel has is openning files in read only mode. Alfresco Office Services code is not public (AFAIK) so I cannot try to see how these problems can be fixed so I was force to come up with solution on WebDav side.

To that end I produced small extension that changes how WebDav endpoint behaves and instead of error in that situation will create new lock for file (assuming that no other user has a lock ofcourse). That comes also with downside - AOS module has to be disabled as it depends on WebDav classes that I had to change and I do not have access to AOS source code to adjust it. Solution seems to work well and I cannot see any problems with it but I would like to hear opinions of others.

My questions are what do you think about this approach to the problem, do you see any potential problems I may encounter with that fix? Do you think Alfresco would be willing to incorporate this change to it's codebase given that it would be against RFC specs? Or maybe you has similar problem and found better solution ?