Search code examples
node.jsexpressjquery-file-upload

Integrating jQuery-File-Upload plugin with blueimp-file-upload-node npm module


I am trying to integrate the jQuery-File-Upload (https://github.com/blueimp/jQuery-File-Upload) with the npm module "blueimp-file-upload-node" to process file uploads.

Sadly, this package "blueimp-file-upload-node" has not been documented yet.

The frontend integration is working correctly, but I am struggling to get the upload functionality working.

I have read and followed this section: https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#using-jquery-file-upload-ui-version-with-nodejs which tells me to start the service by running: ./node_modules/blueimp-file-upload-node/server.js (notice, the path of this file is within my node_modules folder)

I would like to have the file uploader as a route of my app, (i.e. /upload) not a separate service, on a different port.

How would I go about that?

My code is here: https://github.com/robsilva/fileUploader

I really appreciate if anyone can shed some light here.


Solution

  • Seems like you are looking for the express middleware

    https://github.com/aguidrevitch/jquery-file-upload-middleware