Online:Image Upload Issue

Avatar

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile
Anita_p
MVP

01-04-2019

Hi,

I am getting below error while uploading images. Need quick assistance.

1723532_pastedImage_0.png

Thanks,

Anita

Accepted Solutions (0)

Answers (6)

Answers (6)

Avatar

Avatar
Springboard
MVP
Venu_Reddy
MVP

Likes

163 likes

Total Posts

171 posts

Correct reply

53 solutions
Top badges earned
Springboard
Establish
Give Back 25
Give Back 10
Give Back 5
View profile

Avatar
Springboard
MVP
Venu_Reddy
MVP

Likes

163 likes

Total Posts

171 posts

Correct reply

53 solutions
Top badges earned
Springboard
Establish
Give Back 25
Give Back 10
Give Back 5
View profile
Venu_Reddy
MVP

04-04-2019

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

Avatar

Avatar
Springboard
MVP
Venu_Reddy
MVP

Likes

163 likes

Total Posts

171 posts

Correct reply

53 solutions
Top badges earned
Springboard
Establish
Give Back 25
Give Back 10
Give Back 5
View profile

Avatar
Springboard
MVP
Venu_Reddy
MVP

Likes

163 likes

Total Posts

171 posts

Correct reply

53 solutions
Top badges earned
Springboard
Establish
Give Back 25
Give Back 10
Give Back 5
View profile
Venu_Reddy
MVP

03-04-2019

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

Avatar

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile
Anita_p
MVP

07-04-2019

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

Avatar

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile
Anita_p
MVP

07-04-2019

Hi Venu,

Thank you for your response.

I will try this.

Regards,

Anita

Avatar

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile
Anita_p
MVP

04-04-2019

Hey Venu,

Thank you for your response but I am just uploading image manually using: Resources->Online->Public Resources option.

Regards,

Anita

Avatar

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile

Avatar
Contributor
MVP
Anita_p
MVP

Likes

119 likes

Total Posts

119 posts

Correct reply

29 solutions
Top badges earned
Contributor
Shape 1
Ignite 3
Ignite 1
Validate 1
View profile
Anita_p
MVP

02-04-2019

Any inputs ?