I have a foreach loop which cycles through a bunch of images, and uploads them using this code:
foreach(var image in fetchimages) {
string fileName = "https://www.mywebsite.co.uk" + image.ImageOriginalURL;
var uploadParams = new ImageUploadParams()
{
File = new FileDescription(fileName)
};
var uploadResult = cloudinary.Upload(uploadParams);
var mytest = new ImageUploadResult();
myurl = mytest.SecureUri;
db.Execute("UPDATE Property_Images SET NewURL = @0 WHERE ImageID = 145", myurl);
}
However, each time, the myurl
variable is empty. I'm thinking i possibly have the ImageUploadResult()
in the wrong place in the foreach loop?