Open joeherold opened 8 years ago
For the connected Client it should look something like this....
mountpoint (mounted drive in e.g. OSX finder)
----- root1
----- root2
----- root3
This is not a tested code flow, but it should be possible: https://github.com/mikedeboer/jsDAV/blob/master/lib/DAV/server.js#L115
This uses https://github.com/mikedeboer/jsDAV/blob/master/lib/DAV/simpleCollection.js and that should work like you describe in your second comment.
If it doesn't work, please show me the terminal output and perhaps a screenshot of your client.
I'm curious :wink:
Ok. I will try in about an hour. But when I look at your provided link at line 119 a question came up: Does a tree (iTree) implements the iNode features? Probably this will throw an error. But I will check it out. THX
https://github.com/mikedeboer/jsDAV/blob/master/lib/DAV/server.js#L119
And one more thing I am interested in asking you: how did you solve that node does not react to all http methods. When you make an console.log of
Var http = require("http"); Console.log(http.METHODS);
There are missing plenty of methods you defined in the cors.js.
How did you resolve this? I don't understand it. 🤓
I didn't solve it, NodeJS is just not interested in following standards properly.
Ah. Ok. Lol. During a discussion I had with a sails.js developer about exact that topic a pull request for the http parser was opened to implement in node http parser directly.
But it could be resolved by creating a server based on "net" with a custom http parser instead of using "http" module. But this might be a lot of work...
Net reacts to all requests
@joeherold did you managed to find a solution for the multiple trees.
I found a solution. I hope it helps someone else:
var jsDAV = require("jsDAV/lib/jsdav");
var jsDAV_Locks_Backend_FS = require("jsDAV/lib/DAV/plugins/locks/fs");
var jsDAV_FS_Directory = require("jsDAV/lib/DAV/backends/fs/directory")
jsDAV.createServer({
node: [jsDAV_FS_Directory.new('/folder1'), jsDAV_FS_Directory.new('/folder2')],
locksBackend: jsDAV_Locks_Backend_FS.new(__dirname + "/locks/files"),
}, 8000);
return Promise.resolve();
Is it possible to add an array of multiple tree objects to the node attribute? Idea behind is a CMS business-logic, where in the backend an administrator may define multiple root folders out of a complete tree structure for separate users and groups what they have access to.