I want to Upload images to Public resources every morning. Is it possible to automate this process.
I want to Upload images to public resources at a regular interval of time are there any API's to this.
I want to Upload images to public resources at a regular interval of time are there any API's to this.
Hello,
i have done script to upload photos to public resources from JS activity within workflow. You can add list of files and loop below script
var file = new File("path_to_file\\mont.jpg");
if(!file.exists)
logError ("File '" + file.fullName + "' does not exists.");
var extension = /[^.]+$/.exec(file.name);
var md5 = HMACStr(file.name,"UTF-8","MD5");
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();
Result after you run this javascript

Marcel
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.