These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

LiveCycle Designer 8 - Upload file as attachment

thea_ls
Registered: Oct 24 2007
Posts: 12

I have a form created and I have a Textbox Field where the user can click on it and it will open a window for the user to select a file to attach. All is good there. So, the PDF shows there is an attachment, however, when it is "submitted" to my email address (I have it sent as an XML file, not PDF) the attachment doesn't show up. Do I need some sort of uploading code? FYI: I am very new to this.
 
Below is what I have for Javascript.
 
For the 'click event' I have:
 
var myDoc = event.target;
var sFile;
myDoc.importDataObject(sFile);
var myDataObject = myDoc.getDataObject(sFile);
 
For the 'mouseUp event' I have:
 
TextField2.rawValue = myDataObject.path;
 
___________________________________________________
 
It seems like I have no function to actually get it to upload...and I
A) have no idea what this function would be and
B) have no idea where I would put this
  
Side note: the files that the user will be attaching are going to be CAD or SolidWorks files. (huge!)

My Product Information:
LiveCycle Designer, Windows
pddesigner
Registered: Jul 9 2006
Posts: 858
It's not possible for Adobe Reader users to attach a file other than one created with Acrobat.

Read Thom Parkers article (in the JavaScript Corner) titled File paths in Acrobat JavaScript. Pay attention to the information on security restrictions for file attachments.

I suggest sending a common PDF with this button action and include in the body of the message instruction on attaching the file.

app.mailMsg(true, "yourEmailAddress [at] YourCompany [dot] com", "","","Subject of message","Please attach the CAD file to this message as a zip file.");

My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.