cloudinary.uploader.upload hitting 10mb limit despite resource type being "video"

Options
jeremywarne
jeremywarne Member Posts: 1

Hi all,

I'm using the Node.JS cloudinary SDK, with a free account, and running the following:

const previewParams = {

    resource_type: 'video',

    public_id: destinationPath,

    overwrite: true,

    effect: 'preview:duration_15.0:max_seg_5:min_seg_dur_3.0'

  };

  

  const response = await cloudinary.uploader.upload(httpsS3VideoPath, previewParams);

The uploader is correctly reading my video from the public s3 link, but it's complaining that the max file size is 10mb, and the video is 43mb.

I'd like to test out my use case before upgrading my account; I was under the impression that if I set resource_type to 'video', it would let me upload up to 100mb. Where am I going wrong?

Answers

  • tia
    tia Member, Cloudinary Staff Posts: 24
    Options

    Hi Jeremy, 

    Thanks for reaching out and for sharing your code.

    From what you have shared, I cannot see how you are importing Cloudinary. There are two options. You could be using

    var cloudinary = require('cloudinary').v2
    

    or you could be using

    var cloudinary = require('cloudinary');
    

    The way you import determines the order of the parameters passed to the method call. If you are using the second option I mentioned, then the params need to be the 3rd parameter and not the second one as I see in your code. If you want to keep using the second method, your method call should begin with cloudinary.v2.uploader

    Or you can change your import statement to the first option that I mentioned, and then you can continue with cloudinary.uploader

    You can reference some helpful documentation here on the Node SDK installation and setup:

    I hope this helps. Please make one of those adjustments to your code and try your upload again. Let us know how it goes. Of course, if you have any questions at all, do not hesitate to ask.

    Kind Regards, 

    Tia