GraffitiUploader

View Categories

Enumerations #

This class exposes no enumerations.

Constants #

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
FileClickedtheFile as GraffitiWebFileNoneFired when the user clicks a file in the display.
FileExcludetheFile as GraffitiWebFileBooleanFires before the file has been uploaded. Returning True in this event will trigger that the file should not be uploaded.
FileRemovedtheFile as GraffitiWebFileNoneFired when the user removes a file from the display.
MouseEnterNoneNoneThe mouse has entered the control.
MouseExitNoneNoneThe mouse has exited the control.
UploadCompletetheFile as GraffitiWebFileNoneRaised when a file upload has completed.
UploadProgresstheFile as GraffitiWebFileNoneRaised when a file upload has progressed.

Methods #

NameParametersReturn TypeDescription
AddFiletheFile as GraffitiWebFileNoneAdds a file element to the display (does not support previews to limit packet size.
RemovetheFile as GraffitiWebFileNoneRemoves a file from the display.
RemovetheFile as StringNoneRemoves a file from the display.
RemoveAllNoneNoneRemove all files from the display.
UpdateNametheFile as GraffitiWebFileNoneUpdates the item’s name in the display to match that of the GraffitiWebFile object.

Properties #

NameTypeDefault ValueDescription
AllowRemoveBooleanTrueAllow users to remove items from the upload display.
CancelUploadConfirmTextString“Are you sure you want to cancel this upload?”Localizable string.
CancelUploadTextString“Cancel”Localizable string.
CompleteTextString“Complete!”Localizable string.
FallbackTextString“Please use the fallback form below to select your files”Localizable string.
FileTooBigTextString“File is too big ({{filesize}}MB). Max filesize: {{maxFilesize}}MB.”Localizable string.
InvalidFileTypeTextString“You can’t upload files of this type.”Localizable string.
MaxFileSizeInteger0Maximum allowed file upload size in bytes.
PromptTextString“Drop files here<br>
Or click to select”
Sets the text to be displayed when the control has no currently listed files.
RemoveFileTextString“Remove”Localizable string.
SendingTextString“Sending…”Localizable string.
ThumbnailHeightInteger120The height to be used for display picture thumbnails.
ThumdnailWidthInteger0Width of thumbnails. Leave at 0 to maintain aspect ratio.
UploadPathFolderItemNilRoot 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:

TargetLocation
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.