hclleapforum

Open full view…

Attachment-related questions (still after reading a few threads)

josat
Thu, 23 May 2019 00:34:09 GMT

Hi Hi I am currently using FEB 8.6.4 I went through this blog ' Working With Attachments - https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W65fd19fc117a_4d18_87e4_5f7b8a6727cc/page/Working%20With%20Attachments 1 - My first question is that this is the URL to retrieve the attachment - /forms/secure/org/run/service/ContentStorageService/" + attachmentid; but it looks different from the one Chris specified in another thread (Can I get the link to an attachment via Js?) which speicifies the URL as /apps/secure/org/data/” + appid + “/” + formid + “/attachment/” + What is the difference? 2 - is there an API to delete the attachment that is submitted with the form? I need to retrieve the attachment content that has finished business cycle processing into a BLOB and store it in our internal document management system. This process will be invoked from the java services as part of the business process. There is no FEB form to submit. I do not believe that Chris’s input on the ‘Delete attachment’ thread Is applicable for this. “Yes, you can just cl ear the value of the attachment field and then submit the form. Once the form is submitted the attachment will be marked as not in use and then it will get cleaned up by the attachment service at its regular running interval” Thank you so much Joe

Rob Lintern (HCL)
Fri, 24 May 2019 15:57:47 GMT

.../org/run/service/ContentStorageService/" + attachmentid is the older deprecated way to get an attachment .../org/data/” + appid + “/” + formid + “/attachment/” + attachmentUid is the new way. This is more secure than the old way. There is no explicit REST API to delete an attachment. Attachments are deleted automatically when they are no longer linked to a submission. If you are using the attachment API's for general document storage (without associated form submissions), it wasn't meant for this purpose.

Rob Lintern (HCL)
Fri, 24 May 2019 17:05:55 GMT

If you have a valid scenario for deleting an attachment without removing the reference from an associated submission, please let us know.

josat
Thu, 30 May 2019 00:55:43 GMT

Thank you very much Rob for the detail answers!