Comments (15)
Try this one
var app = express();
app.all('/files/*', function(req, res) {
server.handle(req, res);
});
app.listen(port, host);
from tus-node-server.
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.
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.
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.
I stand corrected! And thanks for the update @bhstahl!
from tus-node-server.
@Acconut its not working :(
from tus-node-server.
@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.
@bhstahl I already use that but it makes me error when my client in android
from tus-node-server.
@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.
@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.
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.
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.
ow thanks @makoy21 it's working! thanks.
from tus-node-server.
@makoy21 Thank you for providing your help 😄
from tus-node-server.
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)
- Uploads to S3 (via uppy) work with tusd, but fail with tus-node-server using the same exact config
- @tus/s3-store: add option to disable object tags HOT 10
- Track server-side upload progress HOT 2
- metdata example uses undefinded validateMetaData function HOT 1
- Demo for GCS incorrectly uses GCSDataStore HOT 3
- CRC errors using @google-cloud/storage 7.7.0 HOT 2
- Mixed content error - Page load over https buyt requested url is insecure HOT 1
- @tus/s3-store: Doesn't work with R2 HOT 1
- S3-store doen't work with Cloudflare R2 storage HOT 2
- Respect X-Forwarded-Port and X-Forwarded-Prefix as well HOT 2
- serverless integration HOT 1
- Upload fail after 10min request HOT 3
- Error installing 1.4.0 from npm HOT 2
- tus-node-server and ietf HOT 11
- Simultaneous file upload leads to corrupted files HOT 2
- Is there a way to pass variables between the `onUploadCreate` and the `onUploadFinish` functions? HOT 12
- Allow hooks to override metadata HOT 1
- Recommended nginx configuration HOT 2
- How to get final name back in client? HOT 4
- [S3Store] 0 bytes files are not uploaded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tus-node-server.