Skip to content
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.

Nodejs support for uppy server #86

Closed
jazkh opened this issue Apr 27, 2018 · 4 comments
Closed

Nodejs support for uppy server #86

jazkh opened this issue Apr 27, 2018 · 4 comments

Comments

@jazkh
Copy link

jazkh commented Apr 27, 2018

Hello,
I was wondering if uppy server has any documentation for nodejs server to handle file uploading?
Any example on how to pass file metadata/information from uppy (front end) to nodejs backend and then use those information to save in database?
Thank you

@damianijr
Copy link
Contributor

@jazkh you can define your upload URL in front-end, then uppy-server at end will dispatch the file to these URL with all information defined.. and then you could save all of then in database.

Front-end:
const uppy = new Uppy() .use(XHRUpload, { endpoint: 'http://your-upload-url', headers: { Authorization:Bearer ${token}, }, formData: true, fieldName: 'itemFile', }) .run();

and you could use multer, express-fileupload or something like that to handle multipart request and save file and metadata in database.

@jazkh
Copy link
Author

jazkh commented Apr 28, 2018

@damianijr I am using Tus node server as backend and uppy client for frontend.
I am facing GET 404 (Not Found) error when requesting file from backend.

@Acconut
Copy link
Member

Acconut commented Apr 29, 2018

I am using Tus node server as backend and uppy client for frontend.
I am facing GET 404 (Not Found) error when requesting file from backend.

This is how tus-node-server works by design, as you discovered in tus/tus-node-server#84 (comment)

@ifedapoolarewaju
Copy link
Contributor

closing this as the issue is more related with tus-node-server

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants