Skip to main content
Version: 1.0.4

Upload

Pick or drop a file. The file is exposed on the component’s value and through the fileReceived event, so a script can store it anywhere.

The Upload component as it renders with its default settings.The Upload component as it renders with its default settings.

Reach for it when you need:

  • Attaching a photo to a downtime record
  • Importing a CSV for a pipeline to process

Component name: Upload · Category: Input

In the palette: Pick / drop a file — store it anywhere via its value or the fileReceived event

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
valueunion""The file reference: a server URL (server mode) or an inline data URL (data mode). Bind this to a write Named Query param to store it. Array when 'multiple'.
storageModeenumserverserver = upload to the sandboxed uploads folder and keep a URL; data = keep the file inline as a base64 data URL (small files only). Options: server · data.
folderstring""server mode: destination folder under the uploads root (e.g. invoices/2026). Supports {{bindings}}. Confined to the sandbox — it can't escape the uploads root.
multiplebooleanfalseAllow selecting several files (value becomes an array of references).
acceptstring""Allowed file-type filter, e.g. image/*,.pdf. Blank = any.
maxSizeMBnumber25Reject files larger than this many MB (0 = no widget limit). This can only TIGHTEN the platform limit set in Settings → Storage — the server enforces the global cap regardless.
dropzonebooleantrueShow a large drag-and-drop area instead of a single button.
buttonLabelstringChoose file
showPreviewbooleantrueShow image thumbnails for image files.
titlestringUpload
showTitlebooleantrue
titleSizenumber13
shadowbooleantrueShow a subtle drop-shadow on the control. Turn off for a flat look.
disabledbooleanfalse
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
changeChangeInputThe DOM event.
submitSubmitInputThe DOM event.
focusFocusInputThe DOM event.
blurBlurInputThe DOM event.
fileReceivedFile receivedUploadFile metadata, under file / files.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Files saved with system.files.save land in the workspace uploads folder and come back with a URL usable by Image, PDF Viewer or Link.

See also