Crop the video and upload
Hello.
I have an area to crop with x,y,width, and height.
So I want to use like cloudinary like this in node.js
```
await cloudinary.v2.uploader.upload("before_crop.webm",{
transformation: [
{
x,
y,
width,
height,
crop: "fill",
},
],
});
```
And it returns
Error while cloudinary { message: 'Invalid image file', name: 'Error', http_code: 400 }
Is it impossible to crop video before upload?
0
-
Official comment
Hi Noah,
Thanks for reaching out.
For resources other than images like videos, you will need to add the resource_type parameter (as mentioned here) and set it, in your case, to video:
await cloudinary.v2.uploader.upload("before_crop.webm",{
resource_type:"video",
transformation: [
{x,y,width,height,crop: "fill"},
],
});Hope that helps.
Best,
Loic
Post is closed for comments.
Comments
1 comment