Skip to main content

Custom Attributes

Application

The plug-in exposes the following attributes with application scope:

Attribute nameTypeDefault value
Display MessageTextDrop files here or click to upload.
Fallback MessageTextYour browser does not support drag'n'drop file uploads.
File too Big MessageTextFile is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.
max. Files MessageTextYou cannot upload more than {{maxFiles}} files.
Remove File MessageTextRemove file
Cancel Upload MessageTextCancel upload
Cancel Upload Confirm MessageTextAre you sure you want to cancel this upload?
Invalid File Type MessageTextYou can not upload files of this type.
Chunk Size (in KB)Number1048576

Component

The plug-in exposes the following attributes with component scope:

Storage

Attribute nameAttribute TypeDescription
Collection / Table NameTextUsed to define the APEX Collection name or Custom Table name.
Storage TypeSelect ListChoose where the uploaded files are saved.

APEX Collection
The APEX collection method should be the easiest. You only have to enter a Collection Name. Data will be saved as follows:

Column c001 => filename
Column c002 => MIME type
Column d001 => date created
Column n001 => random file id
Column blob001 => BLOB of file

The Default Collection name is DROPZONE_UPLOAD.

Custom Table
When using custom table, besides table name, the following column name could be used:
- Primary Key
- Foreign Key
- Filename
- MIME Type
- File Content (BLOB)
- Date

Please note that the Primary Key (PK) must be processed with a Before Insert Trigger or similar.

Web service
The plug-in allows you to upload directly to an external web service.
Filename ColumnTextColumn of your custom Table which holds the information for the Filename. Only if Storage Type is set to Custom Table
MIME Type ColumnTextColumn of your custom Table which holds the information for the File MIME Type. Only if Storage Type is set to Custom Table
BLOB ColumnTextColumn of your custom Table which holds the information for the File Content (BLOB). Only if Storage Type is set to Custom Table
Date ColumnTextColumn of your custom Table which holds the information for the File Upload Date. Only if Storage Type is set to Custom Table
PK ColumnTextPrimary Key (PK) Column of your custom file Table. The Primary Key (PK) must be processed with a Before Insert Trigger.
FK ColumnTextColumn of your custom Table which holds the information for the foreign key. Only if Storage Type is set to Custom Table
FK ItemPage ItemFK item holding the FK value. Items will be read from the session state. It has to be submitted before upload.
Web Service parametersTextareaSpecify the parameters for the web service call using JSON file.

Behaviour

Attribute nameAttribute TypeDescription
max. File Size in MBNumberMaximum File Size (Float Number) that is allowed per file. If a file is larger, it will be removed.
max. FilesNumberMaximum number of files that can be uploaded at once.
Accepted File TypesTextThis option allows you to define a list of accepted file types. A comma separated list of MIME types (with Wildcard support) or file extensions: image/*,application/pdf,.psd is required.
By default all file types are allowed.
Upload MechanismSelect ListNormal: Files are directly uploaded to the DB using a multipart/form-data POST (FormData) request. This method needs no conversion (decode, encode) of strings, thus the final BLOB is already there and can be used.

Chunked: Files are split into chunks (default: 1MB), then each chunk is encoded into base64. This encoded string is then uploaded to the DB, the DB decodes the encoded chunks and builds a final BLOB out of it.

Both methods should work with all web server combinations. Thus no conversion is needed for "normal" uploads, this method is 2x as fast as "chunked". If, somehow, your web server configuration allows no large multipart/form-data requests, go with the "chunked" method.
ClickableSelect ListIf true, the Dropzone Region will be clickable. If false, nothing will be clickable and only Drag & Drop is possible.
Copy & Paste supportSelect ListAdds support for Copy & Paste of images in modern browsers (like Chrome or Firefox > 50).
Remove Files after uploadSelect ListIf true, clears all files from the Dropzone Region after uploading has finished.
Delete FilesSelect ListPossibility for end users to delete each file that was uploaded to the server.
Only if no Page Refresh has occurred.

Look & Feel

Attribute nameAttribute TypeDescription
Dropzone StyleSelect ListUI Style of your Dropzone Region
- Grey Border
- Blue Dashed Border
- Red Dashed Border
- Grey Dashed Border/Background
WidthTextEnter the default width of your Dropzone Region. Valid values are px and % data.
HeightTextEnter the default height of Dropzone Region. Valid values in px.
Show File PreviewsSelect ListShow preview images for common file types when adding files. Images get displayed with real content. If you want to add more images or others just Copy/Upload the PNG files to the "img" directory. Naming: .png

Transformation

Attribute nameAttribute TypeDescription
WatermarkTextareaIn order to watermark images prior upload, a JSON configuration string has to be defined in this field.
The following attributes are accepted:
- font: specifies the text style to use when drawing text. This string uses the same syntax as the CSS font specifier.
- fontColor: specifies the color, gradient, or pattern to use inside shapes. The default style is #000 (black).
- positionX: x-axis coordinate of the point at which to begin drawing the text, in pixels.
- positionY: y-axis coordinate of the point at which to begin drawing the text, in pixels.
- text: string to be embedded
Rename Function (JavaScript)TextareaIn order to rename your files prior upload, a user defined function can be defined  in this field. This function gets the file as an argument and can use the file object.

The actual name of the file that gets used during the upload can be accessed through file.upload.filename.

When converting files to JPEG, a rename function is needed to change the extension.
Transformation parametersTextareaIn order to transform images prior to upload, a JSON configuration string has to be set.
The plug-in supports image resizing keeping aspect ratio, image cropping and image conversion and compression.
- Resize keeping aspect ratio: setting at least one resize attribute (resizeWidth or resizeHeight), will lead to image resizing keeping aspect ratio
- Resize cropping: setting both resize attributes (resizeWidth and resizeHeight) will lead to image cropping to desired size
- Convert and compress: setting resizeMimeType to "image/jpeg" and resizeQuality to a decimal between 0 and 1, will lead to image conversion to JPEG and compression to desired rate. A renaming function is required if the source image is not in JPEG format. See renaming function for that.