# page\_testupload

**URL:** <https://community.ofelia.com/t/page-testupload/26137>\
**Category:** Contributions\
**Tags:** page\
**Created:** [12 August 2016 20:33 UTC](https://community.ofelia.com/t/page-testupload/26137 "2016-08-12T20:33:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre-yves\_Monnet](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pierre-yves\_Monnet](https://community.ofelia.com/u/Pierre-yves_Monnet)\
**Post date:** [12 August 2016 20:33 UTC](https://community.ofelia.com/t/page-testupload/26137/1 "2016-08-12T20:33:50Z")

</div>

Show an example to upload a file to a case with a REST API

![Home page](https://raw.githubusercontent.com/Bonitasoft-Community/page_tesupload/master/screenshoot_testupload.jpg)

This page show you how to implement a File Upload in your Custom page.

Define a process with a Document variable, and create a case in this process. So, you need to have a the case id and the Document Name.

upload : then, first upload a new file on the server using ngUpload. The BonitaEngine will return you a temporary file name.  
Assign : the file name is give in the Assign part. Here the tips : firs call, a POST has to be done.  
After, to update the content, a PUT has to be done, but with the documentId (which is an internal information), so a first call to get this documentId is necessary.   
**Repository URL :** [https://github.com/Bonitasoft-Community/page\_testupload](https://github.com/Bonitasoft-Community/page_testupload)
