M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Regular Contributor
Posts: 310
Registered: ‎03-10-2016

Handling attachments with workflows

Hi there!


For some of you this should be easy - I want to handle attachments within workflows in two cases e.g.:

  • uploading a PDF with a form: selecting the file via explorer and savin the path as URL, later I want to open the file out of this attribute
  • uploading a picture with a form and possibilty to show/open it later

I'm not sure which

a) datatypes I should use in database (postgis)

b) which widget I should use for the form


checking out the workflow manager,  there are several options: TextField, Image, Hyperlink.


What's the best practice for handling it? I tried to find documentation here, but unfortunalety not succesful.


Any help/hints would be appreciated!




GAUSS Ingenieurtechnik GmbH | Germany
Technical Evangelist
Posts: 775
Registered: ‎11-12-2015

Re: Handling attachments with workflows

Hi Stefan,


If I understand your post correctly you should be after the FormFile widget in workflows.

Are you familiar with it from GeoMedia Smart Client origins? It hasn't changed much from there.


Here are a few examples of using it as it comes out in the xml. You will find the 'File' widget in the Workflow Editor and these properties will be present.


Example 1: Definition of a simple file upload. File is uploaded in "C:\Temp\Upload" directory and the full file path is persisted in "FilePath" column

<FormFile name="FilePath" datatype="file" uploaddir="C:\Temp\Upload" multiple="false" />


Example 2: Definition of a simple binary file upload. File is only as binary persisted in "FileData" column

<FormFile name="FileData" datatype="binary" multiple="false" />


Example 3: Like Example 1, but additional file name and content type are stored in the "FileName" and "ContentType" columns

<FormFile name="FilePath" datatype="file" uploaddir="C:\Temp\Upload" multiple="false" filenamefield="FileName" contenttypefield="ContentType" />


Example 4: Like Example 2, but additional file name and content type are stored in the "FileName" and "ContentType" columns

<FormFile name="FileData" datatype="binary" multiple="false" filenamefield="FileName" contenttypefield="ContentType" />


You may also wish to peruse the 'Management of Medias' section of this JS API tutorial.