Giter Site home page Giter Site logo

Comments (9)

joeherold avatar joeherold commented on July 19, 2024

For the connected Client it should look something like this....

mountpoint (mounted drive in e.g. OSX finder)
     ----- root1
     ----- root2
     ----- root3

from jsdav.

mikedeboer avatar mikedeboer commented on July 19, 2024

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 😉

from jsdav.

joeherold avatar joeherold commented on July 19, 2024

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

from jsdav.

joeherold avatar joeherold commented on July 19, 2024

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

from jsdav.

mikedeboer avatar mikedeboer commented on July 19, 2024

I didn't solve it, NodeJS is just not interested in following standards properly.

from jsdav.

joeherold avatar joeherold commented on July 19, 2024

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.

nodejs/node#5601

from jsdav.

joeherold avatar joeherold commented on July 19, 2024

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

from jsdav.

dimitarkolev avatar dimitarkolev commented on July 19, 2024

@joeherold did you managed to find a solution for the multiple trees.

from jsdav.

dimitarkolev avatar dimitarkolev commented on July 19, 2024

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();

from jsdav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.