FineUploader / server-examples

Server-side examples for the Fine Uploader library

Home Page:https://fineuploader.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

s3handler.js parsing body isn't working anymore

quisse opened this issue · comments

I am using a multipart form parser to get my policy because bodyparser isn't working anymore.

The Express bodyParser() used within the server example seems to have been deprecated within Express version 4 (released after 2014-06-19). What version of Express are you currently running? Can you verify that Express 3.x is still failing?

I'm using 4.13.1, so no I think 3.x works. but in "s3handler.js" it says express 3.3.5+. When i saw express.bodyParser() was deprecated i thought the body-parser would solve it. Maybe it's less confusing when in comments it says it is'nt compatible with 4.x. But, it can be fixed by using a formdata parser (like formidable (https://www.npmjs.com/package/formidable)).

When the Node.js server demo was created, I'm assuming bodyParser() (and Express 3.x, for that matter) had not yet been deprecated. Since you're using Express 4.x, I would not necessarily trust this code example.

Instead of using a differed parser, you might be able to simply tweak your Express configuration. If this is the case, perhaps you could fork this repo and create a pull request with a proper fix.