javascript - Adding Meta Data to socketio-file-upload -
i have socketio-file-upload
plugin upload photos on server nodejs, work, when try use plugin functionnalaty add data upload, script stuck.
client side
var uploader = new socketiofileupload(socket); uploader.listenoninput(document.getelementbyid("upload")); uploader.addeventlistener("start", function(event){ event.file.meta.hello = "world"; });
sever side
var fileupload = require("socketio-file-upload"); fileupload.listen(app); io.on('connection', function(socket){ var upl = new fileupload(); upl.dir = "img"; upl.listen(socket); upl.on("start", function(event){ console.log(event); }); });
the error comes client side event argument has no meta object, , when decide create 1 server side doesn't receive it
the documentation of socketio-file-upload on adding meta data
Comments
Post a Comment