Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Save attachements to a specific folder on the server


Level 5

I need in a process to upload files from a user to a specific folder on a server.

My first idea was to use the attachments tab into workspace to add the files. I was able to save the attachments into the folder in the workbench after a step validation.

The problem was that the attachments are saved in database or GDS and the size grows up too big.

My second option was to use the javascript methods importdataobject and exportdataobject into the pdf.

I can import the files in the pdf.

But there is two problems :

- the folder destination can't be choosen. The user must selected the folder. The CDIpath option is no longer available for the exportobjectdata.

- I can't save all type of attachments. The EXE files etc can't be saved even if I checked options in the Reader.

How can I upload this files ?

Thanks for any help.
11 Replies


Level 10
You can have them in the PDF (so that they are not stored in the DB). There are other services that exist to allow you to extract the attachments (see the processFormSubmission in Forms or the Execute DDX in Foundation). Once you have the files extracted, you can use the File Utilities in Foundation to create a directory and write these attachments out to the file system.


Level 5
Hi Paul,

When you say : "You can have them in the PDF (so that they are not stored in the DB)"

You mean by using the importObjectData method in javascript or the paperclip because I'm able to import the files in my PDF but not to save them in a specific folder.

The exportObjectData not allow me to save the files in a folder without a user selection and I am not able to save EXE files for example.

I try to use the submit pdf form es update 1 but I'm not able to retrieve the attachments.

I can retrieve the attachments after an assign task and use the file utilities to write whose I need on a folder. I try the same way with processFormSubmission but with no results.

EDIT : The variable "sources" of type List/Documents is still empty.

Thanks for your help.


Level 10
Yes attach them using the paperclip then you can use one of these two methods to get the attachments out. Note that you have to modify the submit button to send back PDF not XDP. Then you can get the attchments out of the PDF using Assembler (a DDX control file is required) or processFormSubmission.

If you still are having issues send the LCA file and the PDF with attachments to this email address and I will have a look.


Level 5
Hi Paul,

First of all thanks for you great help.

So I remove the process field object from my form to put a submit button to send back PDF. I suppose I can't use the form without workspace now because I don't have the route list etc...

I change the xfaform variable to a Document Form variable.

I'm able put all of kind of file in the form with the method importObjectData but with the paperclip I can add Exe or jar file for example.

I retrieve the attachments in the submit orchestration and store them in a local folder.

But the attachments are still stored on the DGS permanently.

How can I remove them during the submit process ?

Thanks again


Level 10
They exist in the GDS while they are in the process as a document variable. The GDS is cleaned at a set intervale (Document sweep interval) they do not exist permanently.


Level 5
My interval is set to 600 seconds but the attachments are not clean up. I can retrieve the attachments but there are still in the Form.

So if I go to the tab audit in workspace, I can see the attachments into the form. So they can be delete by Livecycle ? Am I wrong ?

What I want is to delete them after I stored them in a local folder.



Level 10
They are in the PDF ..... I believe you can delete them from the PDF using Assembler.


Level 5
Hi,<br /><br />In fact, it doesn't work. The file attachments are still embed in the pdf.<br /><br />I use the "Invoke DDX on one document" service after the "FormSubmission" service in my submit service.<br /><br />I though it was working because when I click on the paper clip the attachments doesn't appear anymore. I use the "getPDFproperties" service after the DDX operation to check for attachments in my document. The answer is false, there are no attachments.<br /><br />But the form still make the size of the attachments and I can see the attachments in the GDS.<br /><br />My DDX document : <br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><DDX xmlns="" ><br /> <PDF result="outdoc"><br /> <NoFileAttachments/> <br /> <PDF source="inDoc"/><br /> </PDF><br /></DDX><br /><br />For the DDX service : <br />My input is the output document from the processFormSubmission.<br />My output is an new document called outdoc.<br /><br />I use the getPDFproperties on the outdoc document.<br /><br />Did I make a mistake ?<br /><br />I'll look to other solution like upload my files using a web service(but it seems not easy) or to delete the attachments from the database or the GDS when the process is completed or terminated (it seems even harder and risky).<br /><br />Thanks for your help.


Level 9
Hi Jerome

My suggestion to you is to use the Attachments tab in Workspace rather than the paperclip-attachments within Acrobat - this makes life much simpler for the process designers.

We have developed a tool for purging the attachments of a process, to reduce space in both the database and the GDS.

more information here:



Level 5

Thanks for your suggestion. It is the way I choose. I use the Attachments tab and develop a utility to purge the attachments in my case. I have test it and it seems to work nice.

If I saw my utility doesn't work so great after more testing, I will have a look on your purge tool.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now