Invalid Image File asp.net core
cameraImage = "image in string format(from angular to asp.net core)"
var uploadParams = new ImageUploadParams()
{
File = new FileDescription("File", GenerateStreamFromString(cameraImage)),
Transformation = new Transformation().Width(500).Height(500).Crop("fill").Gravity("face")
};
public static Stream GenerateStreamFromString(string s)
{
var stream = new MemoryStream();
var writer = new StreamWriter(stream);
writer.Write(s);
writer.Flush();
stream.Position = 0;
return stream;
}
uploadResult = _cloudinary.Upload(uploadParams); // getting error
-
Hi Vinod,
In order to better understand the issue, would you mind sharing more details?
1. The exact value that is sent as File in the upload request.
2. The cloud name (i.e. account name) so I could check your logs.If you rather keep this information private, please feel free to open a support ticket at@support@cloudinary.com and we'll continue from there.
0
Post is closed for comments.
Comments
1 comment