Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

Introduction

English
File Upload enables you to attach a file to a form.

 File uploaded through the File Upload is stored under "[Joget Installation Directory]/wflow/app_formuploads".

Info
titleHow to set to a different storage path?

There are 2 ways you can change the wflow folder path:
1. by By adding "-Dwflow.home=PATH" to your JAVA_OPTS when starting tomcat.
2. by By setting the "Uploaded File Storage Base Path" option in General Settings.

...

The easiest way to see how the File Upload works are to use the existing built-in App Expenses Claims. Here are the steps:

...

...

  1. Start the Joget Server  and open the  App Center.

  2. Log in as  admin  and click on the pencil icon on the  Expenses Claim  to open the  Design App. (see Figure 1)

    Image Added
    Figure 1

  3. Click on    Expense Claim Form  and you will be directed to the    Form Builder. 

  4. Hover  the mouse over the  File Upload  element on the canvas entitled Attachments (i.e. Receipts, tickets etc.) and click on  Edit  to open up the Edit File Upload properties. (see Figure 2).

    Image Added
    Figure 2

  5. To see it working, head back to the  Design App  and click the  Launch  button in the  Userview  column.

  6. Click on  Create a New Expense Claim  button on the  Dashboard, fill up the necessary details and click  Continue Next Screen

  7. Here you will find the file upload. Click inside the box to upload or drag and drop files inside the box.

...

Image Removed

Figure 1

Image Removed

...

File Upload Properties

Edit File Upload

Image Added

Image Removed
NameDescriptionScreen (Click to view)
ID

Element ID (By declaring as "receipt", a corresponding database table column "c_receipt" will be created)

Please see Form Element for more information about defining the ID and list of reserved IDs.

LabelElement Label to be displayed to the end-user.

Advanced Options

Data

Image Added

Image Removed
NameDescriptionScreen (Click to view)
Validator

Attach a Validator plugin to validate the input value.

Info
titleWhen will validation takes place?

Validation will take place whenever a form is submitted except when it is submitted as "Save as Draft".

Maximum File Size (KB)
Maximum File Size (KB) in Integer. For example, if the maximum allowable file size is 10 megabytes, enter into this field the value of "10240" which represent 10,240 kilobytes.
Error Message (File size limit exceeded)
Error Message when file size exceeded.
File Type (.pdf;.doc)

Accepted file type extension(s). (Semicolon separated values)

Code Block
titleExample
.pdf;.doc
Error Message (File type mismatch)
Error Message when file type mismatched.
Delete actual file during overwrite or remove?

Actual file will be deleted when the file is removed or being overwritten.


Image Resize

Image Added

Name

DescriptionScreen (Click to view)
Maximum Width (px)

If set, images will be resized to these dimensions before being uploaded.

Info
iconfalse
titleNote

If only one, Maximum Width (px) or Maximum Height (px), the original aspect ratio of the file will be preserved.

Image Removed

Maximum Height (px)

If set, images will be resized to these dimensions before being uploaded.

Info
iconfalse
titleNote

If only one, Maximum Width (px) or Maximum Height (px), the original aspect ratio of the file will be preserved.

Quality (Max 1.0)set the quality of the resized image.
Method

sets how the images should be scaled down in case both Maximum Width (px) and Maximum Height (px) are provided.

There are only two methods:

  • contain
  • crop 
Info
iconfalse
titleNote

By default, it will set to contain.

Permission

Image Added

NameDescriptionScreen (Click to view)
Permission

Manage on who is able to access the file uploaded. Read more at Permission Control.

Image Removed

UIUI

Image Added

Image Removed
NameDescriptionScreen (Click to view)
SizeSpecifies the width, in characters, of an <input> element.
Allowed multiple files upload?
When checked, multiple files can be uploaded.
Readonly

Determines if one can upload a file.

Drop zone padding

Determine the extra size of padding for the larger drop zone.

Info
titleExample

50px

Info
titleExample

5%

Download as Attachment

Determines the download behavior.