File upload

IngredientformIngredients

A dropzone for file uploads directly to a specified endpoint

Ingredient Family: formIngredients

Outline Display: File upload for {{columnName}}, restricted to MIME types {{restrictTo}}

Local scope

The parent slot binds these (look up the slot in the parent to see how):

  • $parentTable – The table (if any) that this form is based on
  • $formFieldsTable – A table of form fields that is built up through the sequence of form ingredients

Settings

Required

  • columnName : column of $parentTable or new (type filter: file type (must be optional))
    the column that will store the handle to the uploaded file
    Set ty only when columnName names a new column (not in $parentTable).

Optional

  • cssWidth : constant value (type: integer; required, non-nullable)
    Width between 1 and 12

  • customLabel : formula (returns text; optional)
    A custom label for the dropdown (leaving this empty uses the column name as the label)
    Scope: none – this formula does not accept column references or handler params.

  • required : formula (returns bool; required, non-nullable)
    whether it is required to upload a file
    Scope: all columns of $formFieldsTable (reference as [ColumnName], e.g., [Name], [Price])

  • restrict : formula (returns bool; required, non-nullable)
    whether to restrict the MIME type even more
    Scope: all columns of $formFieldsTable (reference as [ColumnName], e.g., [Name], [Price])

  • restrictTo : constant value (type: text; required, non-nullable)
    MIME type to restrict to, if any

  • maxFileSize : formula (returns integer; required, non-nullable)
    Max file size allowed to be uploaded. Use 0 for no limit
    Scope: the app’s environment variables (e.g., [ENV_VAR])