Enumerations #
This class exposes no enumerations.
Constants #
This class exposes no constants.
Events #
Name | Parameters | Return Type | Description |
---|---|---|---|
FileClicked | theFile as GraffitiWebFile | None | Fired when the user clicks a file in the display. |
FileExclude | theFile as GraffitiWebFile | Boolean | Fires before the file has been uploaded. Returning True in this event will trigger that the file should not be uploaded. |
FileRemoved | theFile as GraffitiWebFile | None | Fired when the user removes a file from the display. |
MouseEnter | None | None | The mouse has entered the control. |
MouseExit | None | None | The mouse has exited the control. |
UploadComplete | theFile as GraffitiWebFile | None | Raised when a file upload has completed. |
UploadProgress | theFile as GraffitiWebFile | None | Raised when a file upload has progressed. |
Methods #
Name | Parameters | Return Type | Description |
---|---|---|---|
AddFile | theFile as GraffitiWebFile | None | Adds a file element to the display (does not support previews to limit packet size. |
Remove | theFile as GraffitiWebFile | None | Removes a file from the display. |
Remove | theFile as String | None | Removes a file from the display. |
RemoveAll | None | None | Remove all files from the display. |
UpdateName | theFile as GraffitiWebFile | None | Updates the item’s name in the display to match that of the GraffitiWebFile object. |
Properties #
Name | Type | Default Value | Description |
---|---|---|---|
AllowRemove | Boolean | True | Allow users to remove items from the upload display. |
CancelUploadConfirmText | String | “Are you sure you want to cancel this upload?” | Localizable string. |
CancelUploadText | String | “Cancel” | Localizable string. |
CompleteText | String | “Complete!” | Localizable string. |
FallbackText | String | “Please use the fallback form below to select your files” | Localizable string. |
FileTooBigText | String | “File is too big ({{filesize}}MB). Max filesize: {{maxFilesize}}MB.” | Localizable string. |
InvalidFileTypeText | String | “You can’t upload files of this type.” | Localizable string. |
MaxFileSize | Integer | 0 | Maximum allowed file upload size in bytes. |
PromptText | String | “Drop files here<br> Or click to select” | Sets the text to be displayed when the control has no currently listed files. |
RemoveFileText | String | “Remove” | Localizable string. |
SendingText | String | “Sending…” | Localizable string. |
ThumbnailHeight | Integer | 120 | The height to be used for display picture thumbnails. |
ThumdnailWidth | Integer | 0 | Width of thumbnails. Leave at 0 to maintain aspect ratio. |
UploadPath | FolderItem | Nil | Root directory for upload file structure. |
Notes #
Upload Location #
To override the root upload directory, set the UploadPath property to a valid FolderItem.
To override this per file, set the Path property of the GraffitiWebFile parameter in the FileExclude event.
As of Release 45, GraffitiUploader will attempt to setup the default directory structure in the following locations:
Target | Location |
---|---|
Debug |
SpecialFolder.Temporary.Child( "com.graffitisuite.uploader" ) |
XojoCloud |
SpecialFolder.Documents.Child( "com.graffitisuite.uploader" ) |
All Others |
SpecialFolder.ApplicationData.Child( "com.graffitisuite.uploader" ) |
Inside this directory, a path will typically look like this:
/<session.identifier>/<year>/<month>/<day>/<randomizedfilename>.<fileextension>
Users should implement some mechanism of removing unused and/or old files.