Hi,
I am getting below error while uploading images. Need quick assistance.
Thanks,
Anita
Any inputs ?
Views
Replies
Total Likes
Hi,
Make sure both image and html are in the same location.
The image name has to be same inside the html as well.
Regards,
Venu
Hey Venu,
Thank you for your response but I am just uploading image manually using: Resources->Online->Public Resources option.
Regards,
Anita
Views
Replies
Total Likes
Hi anitap82640902,
I tested in my instance and it is working as expected.
There are multiple ways to upload an image.
Please check this thread and it will help you How to Upload a file using Webapp Adobe Campaign?
Regards,
Venu
Hi Venu,
Thank you for your response.
I will try this.
Regards,
Anita
Views
Replies
Total Likes
Hi Venu,
I tried using the below code snippet to upload the image but it does not read the image path and gives the error:
var file = new File("<File Path on my local\image.jpg>");
if(!file.exists)
logError ("File '" + file.fullName + "' does not exist.");
var extension = /[^.]+$/.exec(file.name);
var md5 = HMACStr(file.name,"UTF-8","MD5");
----> Gives error, File does not exist.
if (!file.copyTo("path_to_adobe\\Adobe Campaign v6\\var\\res\\bootcamp\\" + md5 + "." + extension))
logError ("File '" + file.fullName + "' was not copied");
var xmlString = '<fileRes alt="" codepage="0" height="0" name="owl.jpg" nature="" publish="0" storageType="5" useMd5AsFilename="1" userContentType="0" version="" width="0" xtkschema="xtk:fileRes"/>'
var fileRes = xtk.fileRes.create( new XML(xmlString));
fileRes.contentType="image/jpeg";
fileRes.label = "some_label"
fileRes.md5 = md5;
fileRes.fileName = "path_to_adobe\\Adobe\\Adobe Campaign v6\\bin\\..\\var\\res\\bootcamp\\" + md5 + "." + extension;
fileRes.originalName = "path_to_file\\Downloads\\mont.jpg";
fileRes.save();
Can you please assist on this?
Regards,
Anita
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies