0

I am trying to upload image using multiparty in nodejs. It is working fine in local host but having problem when uploading from server. Here is the code

module.exports.uploadimg = function (req, res) {
    var form = new multiparty.Form();

    form.parse(req, function(err, fields, files) {
        if(err) console.log(err)        cloudinary.uploader.upload(files.file[0].path,function(result) { 
        res.send({ result:result,
            serverStatus:200,
            response_message:"image uploaded"       });
        });
    });

}

It is even working fine when i am uploading image from Windows but it is showing timeout while uploading via MAC or Ubuntu.

Vardan
  • 454
  • 1
  • 5
  • 18
  • Code looks fine from "Cloudinary" perspective, can't say about "Multiparty" side. Did you try to verify the transmitted data? – Nadav Ofir Sep 08 '16 at 14:01

1 Answers1

0

Issue is because of some ec2 server settings. I migrated my code to heroku server and it is working perfectly fine there.

Vardan
  • 454
  • 1
  • 5
  • 18