transloadit / uppy-server

[DEPRECATED] 'Uppy Server' was renamed to 'Companion' and lives inside the Uppy repo no
https://github.com/transloadit/uppy/tree/master/packages/%40uppy/companion
MIT License
114 stars 27 forks source link

Nodejs support for uppy server #86

Closed jazkh closed 6 years ago

jazkh commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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 https://github.com/tus/tus-node-server/issues/84#issuecomment-354624753

ifedapoolarewaju commented 6 years ago

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