This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

Resize an image on the Server size before upload

Comments

4 comments

  • Avatar
    Ido

    Hi

     

    Any resizing of the image that is done before the upload, cannot be done by Cloudinary.

    What comes close to what you want to achieve is our incoming transformations which allow performing the transformation upon uploading itself.

    Hope that helps. 

    0
    Comment actions Permalink
  • Avatar
    culturalcare-dev

    This is what i am doing

     

    var uploadParams = new ImageUploadParams
    {
    UseFilename = true,
    UniqueFilename = false,
    Folder = "test" + " / ",
    PublicId = Guid.NewGuid().ToString(),
    EagerTransforms = new List<Transformation>()
    {
    new Transformation().Quality("auto:eco")
    },
    File = new FileDescription(@"C:\blah\_DSC0093.JPG")
    };

    var uploadResult = _cloudinaryClient.Value.Upload(uploadParams);

    0
    Comment actions Permalink
  • Avatar
    culturalcare-dev

    In fact the exception comes back as JsonObj = {{
    "error": {
    "message": "File size too large. Got 14820334. Maximum is 10485760."
    }
    }}

     

    So it does not change the file size before an upload

    0
    Comment actions Permalink
  • Avatar
    Ido

    Hi

    The error you share indeed show that the image size is above the maximum allowed for upload for the account.

    Eager transformations are transformations that are performed after the upload is occurring. Incoming transformations are transformations that happen upon uploading, so the image with the transformation will be considered as an original in the account.

    Note that both these approaches don't resize the image before the upload. Any change to the image before the upload needs to be performed by an external way.

    does that make sense?

    0
    Comment actions Permalink

Post is closed for comments.