voidlabs/mosaico

File upload broken

Closed this issue · 2 comments

Ninos commented

Hey there,

seems because of a dependency to formidable the file upload is broken. I always get following error (Firefox, Chrome):

2022-09-25T11:11:08.107900700Z Error: Buffer.write(string, encoding, offset[, length]) is no longer supported
2022-09-25T11:11:08.107931900Z     at Buffer.write (buffer.js:886:11)
2022-09-25T11:11:08.107935800Z     at MultipartParser.initWithBoundary (/opt/mosaico/node_modules/formidable/lib/multipart_parser.js:61:17)
2022-09-25T11:11:08.107938000Z     at IncomingForm._initMultipart (/opt/mosaico/node_modules/formidable/lib/incoming_form.js:326:10)
2022-09-25T11:11:08.107940600Z     at IncomingForm._parseContentType (/opt/mosaico/node_modules/formidable/lib/incoming_form.js:269:12)
2022-09-25T11:11:08.107942700Z     at IncomingForm.writeHeaders (/opt/mosaico/node_modules/formidable/lib/incoming_form.js:142:8)
2022-09-25T11:11:08.107944600Z     at IncomingForm.parse (/opt/mosaico/node_modules/formidable/lib/incoming_form.js:110:8)
2022-09-25T11:11:08.107946500Z     at UploadHandler.post (/opt/mosaico/node_modules/jquery-file-upload-middleware/lib/uploadhandler.js:177:14)
2022-09-25T11:11:08.107948700Z     at /opt/mosaico/node_modules/jquery-file-upload-middleware/lib/filehandler.js:48:25
2022-09-25T11:11:08.107950400Z     at Layer.handle [as handle_request] (/opt/mosaico/node_modules/express/lib/router/layer.js:95:5)
2022-09-25T11:11:08.107952100Z     at trim_prefix (/opt/mosaico/node_modules/express/lib/router/index.js:317:13)
bago commented

You should always give more details about which version you're using and about your environment: environment (os, os version, node version, npm version, etc)
https://github.com/voidlabs/mosaico/blob/master/CONTRIBUTING.md#issues-runningediting

BTW, reading "jquery-file-upload-middleware" in your stack I guess you're using an old release. Try with with 0.18.6 ( https://github.com/voidlabs/mosaico/releases ) or master.

Ninos commented

Ah thx, haven't noticed the docker images are very old... Any news updating the images on docker hub e.g. with new tag?