File upload in embedded form

Hi,

How could I add the file upload function into embedded form?

Thanks.

By defining an input according to the reference:

<input type="file"
       cam-variable-name="INVOICE_DOCUMENT"
       cam-variable-type="File"
       cam-max-filesize="10000000" />
1 Like

Thank you.

Where is the uploaded file is saved ? Thanks.

In the process instance as a variable with the name set under cam-variable-name.

1 Like

Hi,

I have copied the HTML tag and inserted into the Camunda Modeler’s XML. My expectation was to have the upload button at the ‘Start process’ form.

I got this message " unparsable content <input> detected line: 65 column: 5 nested error: unrecognized element [ warning ]"

When I proceed to deploy the diagram, the file upload button do not appear in the screen. Please assist.

Thanks.

Ehh, that’s not how embedded-forms work at all.

You only add a key for the embedded form in the Modeler, you don’t even have to touch the XML there and include any HTML. You simply add the HTML to the embedded-form referenced in your BPMN file.

You may check out the invoice example, they have it covered: https://github.com/camunda/camunda-bpm-platform/tree/master/examples/invoice

The camunda-invoice example requires me to create a maven project and upload into ‘webapps’ directory. I could not find any option in Camunda Modeller to create the maven project. I would like to use only Camunda Modeller without jumping into serious programming. How could I achieve that ?

Thank you.

My understanding is that this is not possible.

The support in the Modeler for embedded forms is more or less non-existent, you can just store a reference to them in the Forms section, but as far as I can see, there is no support to deploy them whatsoever.

However, you don’t have to jump into serious programming with maven anyway. It’s really just the thing that you have to setup your Eclipse, create a project, put the bpmn file and embedded form into the proper directory and then run maven install and copy the generated war file to the deployment directory of the application server. This is not much of a thing to do and requires imho no programming skills at all.

Simply stick to this well-documented part of the getting started guide.

1 Like

Is this reply still relevant today?

Hi @ams
It’s not really up-to-date. We’ve released the first iteration of a form builder which you can read about here: Camunda Forms: Visual Editing of User Task Forms - Camunda

Hi Niall,

Thank you for the reply.

My main question would be:

Is it possible to design and deploy forms that are able to handle file uploads with Camuda Modeler ?
Or I need to go ahead with Java Process Application to be able to design and deploy such forms?

Hello @ams ,

I think right now, it not possible. Yet, this form-js project evolves really fast. Please inspect this form builder demo here:

A way between these two approches in the deployment of an HTML form together with your process definition. Here, you will create a form in native HTML, but instead of having to deploy a whole process application, you can add this form to your process diagram deployment (see screenshot below) and reference it like this:

embedded:deployment:myForm.html

Hope this helps

Jonathan

1 Like

Thank you for the details.

To clarify, in the second solution you proposed, can I handle file uploads in my .html forms?

Hello @ams ,

mainly, the solution enables you to deploy a html form together with your process. Inside this html file, you will be able to use everything embedded forms provide, also containing file upload.

Jonathan

Hi @ams,

here are some details about uploading files in embedded forms: File Upload and Download | docs.camunda.org

Here you can find a working form from the example application: camunda-bpm-platform/start-form.html at master · camunda/camunda-bpm-platform · GitHub.

The download is used in the review-invoice.html.

Hope this helps, Ingo

2 Likes

This was most helpful, thank you!

Also I appreciate everybody’s response on this.

1 Like

Is there a way to achieve a file upload (custom form) in Camunda Platform 8 at the moment?

Hello @frankenbrunnen ,

could you please open a new topic on this?
I will then answer your question.

Jonathan

hello, im trying to follow this conversation inorder to create a field that accepts file upload,its not quite adding up for me.
May you kindly give me a brief on how i can a achieve this. or maybe i topic i can look into inorder to have a file upload field in my camunda form. im using camunda 7

Hi @Racheal_Iperu - this topic is over two years old. Please start a new topic with your questions!

1 Like