Skip to main content

Error: File size too large. Maximum is 10485760. Node.js SDK

Comments

3 comments

  • Daniel Mendoza

    Hi,


    Can you try this:

    var cloudinary = require('cloudinary').v2;
    var fs = require('fs');
    var stream = cloudinary.uploader.upload_stream(function(error, result){console.log(result, error)});
    var file_reader = fs.createReadStream('<path_to_file>').pipe(stream);

    1
  • Freddy May

    Hi Daniel,

    Thanks a lot! It works without options. My mistake was that I used { format: 'png' } option. But I uploaded file with jpg format and the file size increased after conversion.

    0
  • Daniel Mendoza

    Hi @Freddy,

    Great to hear it's working. If you need anything else, let us know.

    0

Post is closed for comments.