How to Upload a file using Webapp Adobe Campaign? | Community
Skip to main content
Level 2
May 2, 2018

How to Upload a file using Webapp Adobe Campaign?

  • May 2, 2018
  • 1 reply
  • 15362 views

Hello,

     I am trying to Create WebApp for Support team, where we handle new requests. I am trying to add Upload File by linking fileRes to Custom table I created, Unfortunately it is showing error when click the Storage option.Vipul Raghavmarcel.gent.86​ Can you guys help me on this.

Thanks

Srikanth

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Marcel_Szimonisz
Community Advisor
Community Advisor
May 3, 2018

Hello srikanthr81596981​,

why not use functionality which is already there?

  1. Web app form with file upload
  2. Save file to public resources
  3. Link public resource to your custom table

1.

choose context variable (eg ctx.vars.file) to save your file from form

2-3 step:

See any file res  xml to know what to save

ctx.vars.file -->has e.g @md5, @originalName.

//create all fields you want to save

//create xml

var fileResXml = <fileRes contentType={contentType}

              internalName={intName} label={originalName} md5={md5Var}

             name={destFileName} originalName={originalName}

             xtkschema="xtk:fileRes"><folder id={folderId}/></fileRes>;

//create file res obj

var fileResObj = xtk.fileRes.create(fileResXml);

//publish

fileResobj.PublishIfNeeded();

//save it to db

fileResobj.save();

var fileResId = *query resource id by unique internal name*;

///save resource id to linked table?

fileResobj.save();

fileRfileResobj.save();esobj.save();

Hope this helps,

Marcel

Level 2
May 3, 2018

Hi Marcel,

Thanks for the reply . I am

actually new to creating web Apps but I did not find the web app form with file upload template. Can you please let me know where exactly to find it?

Level 2
May 3, 2018

I think not as fileResObj already has this in it. But you need to try that


Hi Marcel,

Thanks for all your help, I am not able to upload it on the Server. There must be something I am missing my Form is creating an entry with definied variable in the script but it is not uploading the file to server. I am excepting something like this