|
eknelson responded: |
2010-09-16 15:21 |
Hi Ben,
Sorry, this is all we have right now in the labkey.org documentation on WebDav. If this is a priority for you, I can write up example instructions for installing WebDrive as a WebDav client next week. This doc item has been lurking deep in my doc backlog, but I'd be happy to expedite it for you if it's a priority.
Thanks,
Elizabeth |
|
Ben Bimber responded: |
2010-09-16 15:23 |
do you have any rough stuff you could pass along or maybe some pointers to sites where you would get your information? i'm interested in figuring out how to use javascript / webdav to move files. |
|
eknelson responded: |
2010-09-16 15:28 |
The best thing to do is simply to follow the instructions provided by the webdrive client you plan to use. For example, several of us have had good luck with WebDrive: http://www.webdrive.com/
I'd planned to simply post a few screenshot of the install/setup process in the docs, but not address javascript usage. Only simple docs were planned because setup is so specific to the client you use. Let me know if it would be helpful for me to dig up further specific info for you.
-- Elizabeth |
|
jeckels responded: |
2010-09-17 10:15 |
Hi Ben,
I've looked around a few times, but only found two JavaScript libraries that implement the WebDAV protocol:
http://debris.demon.nl/projects/davclient.js/doc/README.html
http://www.webdavsystem.com/ajax
The former looks to be pretty basic (though perhaps completely sufficient), and the latter has a commercial license. I haven't tried using either of them.
You've probably found this already, but there's an RFC that describes the WebDAV protocol:
http://www.ietf.org/rfc/rfc2518.txt
It should be pretty straightforward to use Ext.Ajax to move a file using WebDAV. Check out section 8.9.5. I believe you can just set the Ext.Ajax.request() method to be "MOVE", use the WebDAV URL of the file that you want to move, and add a "Destination" header. The Host header should be automatically added for you by the browser. This is basically how the file management UI inside of LabKey manipulates files on the server, although it uses Ext.data.Connection. I'm not sure why - I think either approach should work.
Thanks,
Josh |
|
Ben Bimber responded: |
2010-09-17 10:17 |
hi josh,
the latter is what i was thinking. seems like it would be pretty easy to make a generic copy/move file wrapper. i will look into this next week. |
|
marki responded: |
2010-09-17 11:45 |
NOte that the WebdavFileSystem class in fileBrowser.js probably provides a good starting point for any javascript use of WebDav & probably should be extended for any new functionality. |
|
Ben Bimber responded: |
2010-09-20 09:20 |
i used webdrive to mount the labkey site root on my laptop. navigating through folders seems a lot more responsive than cases where i've used webDAV shares in the past, which is a good thing.
while i think allowing users to directly interact w/ files stored in labkey in a manner comparable to the network shares they are accustomed to is going to be popular and appropriate in certain situations, another part of me also believes this has the potential to be quite dangerous.
i have a couple questions:
1. after some minimal testing, it seemed like i had the ability to make folders pretty much wherever i wanted. i am guessing that the logic works something like: if the user has write access to that labkey folder, then they can create subfolders? if that right and can/should there be restrictions on this? how does labkey react if you start creating new folders all over the place?
2. a new feature in labkey is the ability to query files using SQL (see exp.datas table). if i remember correctly, if files are altered using webDAV, labkey should be alerted and reflect these changes (ie. delete/move). is this accurate? what about metadata associated with a file? what happens to that on file move?
3. when i mounted the site root, basically every folder was visible, including those starting w/ period and '@'. is that what's supposed to happen? is there a webDAV flag such that certain directories can be made invisible? while i mounted the site root, obviously we would not do this for most cases. nonetheless, there may be instances where a user would mount one folder that has children, we potentially you'd want to hide the ability to navigate into these children.
4. are many clients allowing users to directly interact with files via webdav in a serious way?
thanks. |
|
|
|