Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Can not view attachments created from watched folder?

Avatar

Level 3

Hi,

I'm facing a problem with the watched folder files, they appear under the Attachment tab for the user, but with broken links, i.e. "The requested resource () is not available" error.

what I did is simply create a new process with watched folder start point, define a list-document variable as I/O and assign this variable to a user service?

all files are under the attachment tab but if I click on any file "Http 404 The requested resource () is not available" error appears, I noticed that the attachments are named with the full url, i.e d:\..\...\name.pdf.

any help

Hussam

3 Replies

Avatar

Former Community Member

there was a bug for a similar type of problem when the form (not an attachment) was loaded from a document variable that came from disk and contained backslashes in the filename attribute of the doc.  the url generated for this document was invalid causing a 404.  Contact support and get the Process Management patch for your version.

Avatar

Level 3

I'll contact the support  and let you know,

thanks

Avatar

Level 3

Hi,

regarding to this issue, we found a workaround, that modifies the document attributes, by doing this step the attachment will be available and can be read

we used "setDocAttribute(/process_data/@docTemp, "wsfilename", getDocAttribute(/process_data/@docTemp,"basename") )" in some cases, and the following script in other cases:

import java.util.List;
String fileName;
String pathName;
String fileUrl;
com.adobe.idp.Document doc;
System.out.println("-----------------------------Get Docs------------------------");
List docList = patExecContext.getProcessDataListValue("/process_data/listOfDocs");
for (int i=0;i<docList.size();i++){
doc=docList.get(i);
doc.setAttribute("wsfilename",doc.getAttribute("basename"));
docList.set(i,doc);

}

patExecContext.setProcessDataListValue("/process_data/listOfAttachments",docList );
System.out.println("-----------------------------/Get Docs------------------------");

hope this will be helpful

Hussam