Custom Attributes
Application
The plug-in exposes the following attributes with application scope:
Attribute name | Type | Default value |
---|---|---|
Display Message | Text | Drop files here or click to upload. |
Fallback Message | Text | Your browser does not support drag'n'drop file uploads. |
File too Big Message | Text | File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB. |
max. Files Message | Text | You cannot upload more than {{maxFiles}} files. |
Remove File Message | Text | Remove file |
Cancel Upload Message | Text | Cancel upload |
Cancel Upload Confirm Message | Text | Are you sure you want to cancel this upload? |
Invalid File Type Message | Text | You can not upload files of this type. |
Chunk Size (in KB) | Number | 1048576 |
Component
The plug-in exposes the following attributes with component scope:
Storage
Attribute name | Attribute Type | Description |
---|---|---|
Collection / Table Name | Text | Used to define the APEX Collection name or Custom Table name. |
Storage Type | Select List | Choose 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 Column | Text | Column of your custom Table which holds the information for the Filename. Only if Storage Type is set to Custom Table |
MIME Type Column | Text | Column of your custom Table which holds the information for the File MIME Type. Only if Storage Type is set to Custom Table |
BLOB Column | Text | Column of your custom Table which holds the information for the File Content (BLOB). Only if Storage Type is set to Custom Table |
Date Column | Text | Column of your custom Table which holds the information for the File Upload Date. Only if Storage Type is set to Custom Table |
PK Column | Text | Primary Key (PK) Column of your custom file Table. The Primary Key (PK) must be processed with a Before Insert Trigger. |
FK Column | Text | Column of your custom Table which holds the information for the foreign key. Only if Storage Type is set to Custom Table |
FK Item | Page Item | FK item holding the FK value. Items will be read from the session state. It has to be submitted before upload. |
Web Service parameters | Textarea | Specify the parameters for the web service call using JSON file. |
Behaviour
Attribute name | Attribute Type | Description |
---|---|---|
max. File Size in MB | Number | Maximum File Size (Float Number) that is allowed per file. If a file is larger, it will be removed. |
max. Files | Number | Maximum number of files that can be uploaded at once. |
Accepted File Types | Text | This 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 Mechanism | Select List | Normal: 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. |
Clickable | Select List | If true, the Dropzone Region will be clickable. If false, nothing will be clickable and only Drag & Drop is possible. |
Copy & Paste support | Select List | Adds support for Copy & Paste of images in modern browsers (like Chrome or Firefox > 50). |
Remove Files after upload | Select List | If true, clears all files from the Dropzone Region after uploading has finished. |
Delete Files | Select List | Possibility for end users to delete each file that was uploaded to the server. Only if no Page Refresh has occurred. |
Look & Feel
Attribute name | Attribute Type | Description |
---|---|---|
Dropzone Style | Select List | UI Style of your Dropzone Region - Grey Border - Blue Dashed Border - Red Dashed Border - Grey Dashed Border/Background |
Width | Text | Enter the default width of your Dropzone Region. Valid values are px and % data. |
Height | Text | Enter the default height of Dropzone Region. Valid values in px. |
Show File Previews | Select List | Show 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 name | Attribute Type | Description |
---|---|---|
Watermark | Textarea | In 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) | Textarea | In 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 parameters | Textarea | In 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. |