public static async Task <string> UploadImage(Context context, Uri imageUri, string publicId, int size) { var account = new CloudinaryDotNet.Account(CloudName, ApiKey, ApiSecret); var cloudinary = new CloudinaryDotNet.Cloudinary(account); var uploadParams = new CloudinaryDotNet.Actions.ImageUploadParams { File = new CloudinaryDotNet.Actions.FileDescription(FilePathUtilities.GetAbsoluteFilePath(context, GetImageUri(context, ResizeImage(context, imageUri, size)))), PublicId = publicId }; var uploadResult = await cloudinary.UploadAsync(uploadParams); return(uploadResult.Uri.OriginalString); }