TypeError: failed to fetch
Using this code with your .NET sdk:
var resizedImageFile = await imageFile.RequestImageFileAsync(format, 1800, 1800);
var buffer = new byte[resizedImageFile.Size];
await resizedImageFile.OpenReadStream(5000000).ReadAsync(buffer);
CloudinaryDotNet.Cloudinary cloudinary = new CloudinaryDotNet.Cloudinary(new CloudinaryDotNet.Account("okcdev"));
var uploadParams = new CloudinaryDotNet.Actions.ImageUploadParams();
uploadParams.Unsigned = true;
uploadParams.UploadPreset = "xxxxxxxx";
uploadParams.Folder = "merch";
uploadParams.PublicId = "0123456789x.jpg";
uploadParams.File = new CloudinaryDotNet.Actions.FileDescription("op.jpg", new System.IO.MemoryStream(buffer));
var result = await cloudinary.UploadAsync(uploadParams);
Getting an exception "TypeError failed to fetch". Any ideas?
-
Hi Chad,
Would you mind sharing your cloud name, so I can take a look at your logs?
If you rather keep it private, please open a ticket at https://support.cloudinary.com/hc/en-us/requests/new and we'll gladly take it from there.
Best,Roee
Please sign in to leave a comment.
Comments
1 comment