Currently, I have a datascrape activity that also datascrapes an image.
The above image is how I perform the assign feature. Currently the variable type for my ‘bakerImg’ is UiPath.Core.Image, but there is an error. What should I assign the variable type as?
My goal for this is to display the image in an email afterwards. Hopefully I can get some clarifications.
"Dear " + custName.ToString + "," + Environment.NewLine + Environment.NewLine +
"Your favourite baker, " + favBaker.ToString + ", has been featured in today's Featured Homebakers." + Environment.NewLine +
"To celebrate, we are offering an exclusive 15% discount on " + favBaker.ToString + "'s treats using the code 'FEATURED15' at checkout." + Environment.NewLine +
"Explore his delightful creations on our website and enjoy this limited-time offer as a valued customer." + Environment.NewLine +
"Thank you for your support." + Environment.NewLine +
Convert.ToBase64String(bakerImg) + Environment.NewLine + Environment.NewLine +
"Warm regards," + Environment.NewLine +
"<b>BakerBuzz</b>"
Check and tell whether it’s working for you
Hope it helps!!
"Dear " + custName.ToString + "," + Environment.NewLine + Environment.NewLine +
"Your favourite baker, " + favBaker.ToString + ", has been featured in today's Featured Homebakers." + Environment.NewLine +
"To celebrate, we are offering an exclusive 15% discount on " + favBaker.ToString + "'s treats using the code 'FEATURED15' at checkout." + Environment.NewLine +
"Explore his delightful creations on our website and enjoy this limited-time offer as a valued customer." + Environment.NewLine +
"Thank you for your support." + Environment.NewLine +
Convert.ToBase64String(bakerImg.ToByteArray) + Environment.NewLine + Environment.NewLine +
"Warm regards," + Environment.NewLine +
"<b>BakerBuzz</b>"
"Dear " + custName.ToString + "," + Environment.NewLine + Environment.NewLine +
"Your favourite baker, " + favBaker.ToString + ", has been featured in today's Featured Homebakers." + Environment.NewLine +
"To celebrate, we are offering an exclusive 15% discount on " + favBaker.ToString + "'s treats using the code 'FEATURED15' at checkout." + Environment.NewLine +
"Explore his delightful creations on our website and enjoy this limited-time offer as a valued customer." + Environment.NewLine +
"Thank you for your support." + Environment.NewLine +
Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(bakerImg.ToString)) + Environment.NewLine + Environment.NewLine +
"Warm regards," + Environment.NewLine +
"<b>BakerBuzz</b>"
Try this below for converting your object to UiPath.core.image.
' Assuming you have an object named 'obj' that you want to convert to UiPath.Core.Image
Dim obj As Object = '...'
' Check if the object can be cast to UiPath.Core.Image
If TypeOf obj Is UiPath.Core.Image Then
' If the object is already UiPath.Core.Image, simply cast it
Dim image As UiPath.Core.Image = DirectCast(obj, UiPath.Core.Image)
' Now you can use 'image' variable as UiPath.Core.Image type
Else
' Handle the case where the object cannot be directly cast to UiPath.Core.Image
' This might involve converting the object to an image format or handling the error appropriately
' For example, if 'obj' is a file path, you might need to load the image from the file
' Alternatively, you might throw an exception or log an error message
End If
Hi, I have implemented your solution, and I have been doing some testing and the above solution you provided works, but right now it cannot assign the image to the variable ‘bakerImg’
since which Package version is the Constructor available for an URL. Can you please elaborate more along with working samples and documentation screenshots?. Thanks for your support.