getting error jsonobj whilw using transformation name method
while i use this code to upload image from root folder of cloudinary media library to particular folder
var uploadParams = new ImageUploadParams()
{
File = new FileDescription(@"https://res.cloudinary.com/druy3heze/image/url2png/v1579847896/https://en.wikipedia.org/wiki"),
PublicId = "https://en.wikipedia.org/wiki",
Folder="test",
EagerTransforms = new List<Transformation>()
{
new Transformation().Width(150).Height(100).Crop("thumb"),
new Transformation().Named("https://en.wikipedia.org/wiki")
}
};
i got error in jsonobj --- "message": "Invalid transformation component - en.wikipedia.org"
and also help me in scaling my image without cropping to size of 150*100 as i have to show/use small size of that image without cropping any part of that image.also i want to replace same image if any allready in that particular folder.
-
Hi,
There are a few things that I am a bit unsure about, but maybe you can clarify:
1. FileDescription(@"https://res.cloudinary.com/druy3heze/image/url2png/v1579847896/https://en.wikipedia.org/wiki")
- This asset doesn't exist, it returns a 404, so that will cause the upload to fail. Did you mean to put a different URL there?
2. PublicId = "https://en.wikipedia.org/wiki",
- I would suggest using a different publicId name here.
3. new Transformation().Named("https://en.wikipedia.org/wiki")
- If you do not have a named transformation called `https://en.wikipedia.org/wiki` an error will be thrown that says `"message": "Invalid transformation component - en.wikipedia.org"`. I would suggest going with something more descriptive and without the special characters, e.g. wiki_resize
- More details on named transformations can be found here.
0
Post is closed for comments.
Comments
1 comment