Skip to main content

I've written a custom service object which saves a file attachment to the database. This seems to work fine and saves the attachment as :


<file><name>filename</name><content>Bunch of random chars</content></file> 


The problem is when I try to display a list of attachments for download I click on the link for the file and the page appears to postback but the download doesn't appear. The property data type is file and I'm just passing the xml that is saved into it.


Using the smart object tester I can see the xml is being returned but and the smartforms list view shows the filename as a link to download so it is at least handling that part of the xml.


 

Hi, Steve.


Did you solve your problem?


Hi Steve,


I have found the solution to this problem.


On your smart object, you need to have a method that returns a singular attachment as well as your List method, as when you click on the attachment in the Form or View, it executes the method to get that singular object back to start the download


There are no extra rules to configure in SmartForms,  it seems to do this automatically for you


Seems like a strange way to have to do it (getting the same data twice), maybe this will be removed ina  future release of SmartForms so it can download the file from the data it retrieved from the List method


 


Joe


Reply