Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate project Expressjs with jQuery-File-Upload?

jQuery-File-Upload works well with Nodejs, but I found it difficult to integrate with Expressjs. Any suggestions? Thanks for your attention.

PD: https://github.com/blueimp/jQuery-File-Upload

like image 512
alditis Avatar asked Apr 06 '12 19:04

alditis


2 Answers

there also exist a middleware for express : https://github.com/aguidrevitch/jquery-file-upload-middleware

like image 148
Touv Avatar answered Nov 17 '22 02:11

Touv


express has formidable baked in via Connect's multi-part middleware e.g. you can simply POST files to an particular route and then use req.files to handle anything that has been uploaded.

A very simple option for handling file uploads is via the jQuery Form Plugin, and if you're using Jade as your template engine, you simply need a form that has a file input and the plugin should take care of the rest.

like image 25
Kwal Avatar answered Nov 17 '22 00:11

Kwal