Bonita 7 - UI - Download document

1
+2
-1

Hi

when I create a process definition, I attach a document. In a form, i would like to download this document (click on a link and save as or open) How can I do this with Bonita 7 ?

Thanks for your answers

Comments

Submitted by yannick.lombardi on Fri, 08/07/2015 - 11:50

That's a good question. I find nothing about this in the documentation. It only explains how to upload a document but not how to download it.

Maybe you can use the document API (http://documentation.bonitasoft.com/bpm-api-1#document) to retrieve the documentURL and then you add a link widget in your form to download the file.

I try it and it seems to works but I don't find how to get the id of the document.

EDIT : It works with this, you need to get the list of your document like this :

../API/bpm/caseDocument?p=0&c=10&f=name=nameOfYourDocument

And you get the url like this :

return "http://localhost:14317/bonita/portal/"+$data.document[0].url;

This is just a sample test that can be improved.

1 answer

1
0
-1

Ok ,thanks for you answer. I've done something like this using widget url and I build a variable like you have indicated

Notifications