Giter VIP home page Giter VIP logo

Comments (15)

makoy21 avatar makoy21 commented on May 28, 2024 3

@ReverseFlash28

Try this one

var app = express();
app.all('/files/*', function(req, res) {
server.handle(req, res);
});
app.listen(port, host);

from tus-node-server.

kvz avatar kvz commented on May 28, 2024

I think the goal of this project is to have a stand-alone server of tus, although it has been some time that work was done here, did anything change on your end @bhstahl?

In the meantime, I think getting the tus-middleware project to 1.0 would be best. For reference:

foobarable/tus-middleware#1 (comment)
tus/tus-android-client#4 (comment)

from tus-node-server.

Acconut avatar Acconut commented on May 28, 2024

Actually, I believe it should already be possible to use tus-node-server with express. I haven't tested it thou:

const server = new tus.Server();
server.datastore = new tus.FileStore({
    path: '/files'
});

app.all('/files/*', server.handle);
app.listen(PORT, HOST);

from tus-node-server.

bhstahl avatar bhstahl commented on May 28, 2024

Correct! The server is designed work as a standalone, or to be used with any node web framework (Express, Restify) that uses the IncomingMessage class of the http module.

@kvz unfortunately our Q1 upload team roadmap got a bit hijacked by other projects, but tus in production is still a Q1 item, which at this juncture might unfortunately flow into April. We haven't lost sight though, a tus node server running with a local & GCS FileStore is on the horizon!

from tus-node-server.

kvz avatar kvz commented on May 28, 2024

I stand corrected! And thanks for the update @bhstahl!

from tus-node-server.

joshuadiezmo avatar joshuadiezmo commented on May 28, 2024

@Acconut its not working :(

from tus-node-server.

bhstahl avatar bhstahl commented on May 28, 2024

@ReverseFlash28 sorry, but that may be due to this still being a work in progress (which is why I haven't published it to NPM yet). You may want to check out https://github.com/foobarable/tus-middleware in the meantime, or contribute to the development here as well!

What version of Express are you running?

from tus-node-server.

joshuadiezmo avatar joshuadiezmo commented on May 28, 2024

@bhstahl I already use that but it makes me error when my client in android

from tus-node-server.

Acconut avatar Acconut commented on May 28, 2024

@bhstahl The reason why @ReverseFlash28 cannot use tus-middleware is that it does not support tus 1.0 which is a requirement for tus-android-client.

its not working :(

What is not working? We need more information about what happened. Any errors?

from tus-node-server.

joshuadiezmo avatar joshuadiezmo commented on May 28, 2024

@Acconut your code

const server = new tus.Server();
server.datastore = new tus.FileStore({
    path: '/files'
});

app.all('/files/*', server.handle);
app.listen(PORT, HOST);

from tus-node-server.

Acconut avatar Acconut commented on May 28, 2024

We cannot and will not help you if you don't provide us with details.
Showing us code and saying it doesn't work is not enough.
Am 11.03.2016 5:33 vorm. schrieb "Reverse Flash" [email protected]:

@Acconut https://github.com/Acconut your code

`const server = new tus.Server();
server.datastore = new tus.FileStore({
path: '/files'
});

app.all('/files/*', server.handle);
app.listen(PORT, HOST);`


Reply to this email directly or view it on GitHub
#16 (comment).

from tus-node-server.

joshuadiezmo avatar joshuadiezmo commented on May 28, 2024

this is the error

at Layer.handle as handle_request
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:131:13)
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:125:14)
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:125:14)
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:125:14)
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:125:14)
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:125:14)
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:125:14)
at next (/Users/username/Downloads/tus-node-server-master/node_modules/express/lib/router/route.js:125:14)

from tus-node-server.

joshuadiezmo avatar joshuadiezmo commented on May 28, 2024

ow thanks @makoy21 it's working! thanks.

from tus-node-server.

Acconut avatar Acconut commented on May 28, 2024

@makoy21 Thank you for providing your help 😄

from tus-node-server.

kvz avatar kvz commented on May 28, 2024

I think this might be useful to others so I just opened the PR to document this in our README #19

from tus-node-server.

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.