GraffitiUploaderSingle

View Categories

About #

GraffitiUploaderSingle is a diverse single file upload control with chunked data transfer for efficient and correct transfers.

Enumerations #

This class exposes no enumerations.

Constants #

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
FileClearedNoneNoneValue has been cleared by the user.
FileSelectedNoneNoneA file has been selected by the user.
UploadBegunNoneNoneThe upload process has started.
UploadCompletedNoneNoneThe upload process has completed.
UploadProgressvalue as DoubleNoneThe upload process has progressed.

Methods #

NameParametersReturn TypeDescription
AcceptedTypesNoneString()Returns an array of the selectable file types.
AcceptedTypesvalue() as StringNoneSets the accepted file types. MIME type of extension. IE: Array( “.png”, “video/mpeg” ). Default is PNG, BMP, and GIF.
IsUploadingNoneBooleanReturns whether an upload operation is currently active.
PreviewTypesNoneString()Returns an array of file MIME types that are currently automatically previewed.
PreviewTypesvalue() as StringNoneSets the MIME types of files that are automatically previewed.
ResetNoneNoneResets the control to its default state.
ValueNoneGraffitiWebFileReturns the current GraffitiWebFile value.

Properties #

NameTypeDefault ValueDescription
AllowFileDropsBooleanTrueControls whether users can drag and drop files to select.
AutoUploadBooleanFalseWhen True, once a user has selected an acceptable file, the upload will automatically commence.
ClearButtonIndicatorWebSDKUIControl.IndicatorsDefaultIndicator applied to the clear button.
ClearButtonStyleGraffitiStyleNilGraffitiStyle applied to the clear button.
ClearButtonTextString“×”Text or HTML caption of the clear button. Also accepts FontAwesome icon definitions.
ClearButtonTooltipString“Clear”Text displayed in the tooltip of the clear button.
ClearButtonVisibleBooleanTrueDetermines whether the clear button will be present in the control’s UI.
MaximumFileSizeInteger0Maximum allowed file size in bytes. 0 = Unlimited.
PreviewIndicatorWebSDKUIControl.IndicatorsDefaultIndicator applied to the preview area. May be obscured by the file preview itself.
PreviewPopoverBooleanTrueWhen True and the user holds their cursor over the preview area, a larger preview of the selected file will be shown.
PreviewStyleWebStyleNilWebStyle applied to the preview area.
PreviewVisibleBooleanTrueDetermines whether the preview area will be present in the control’s UI when a selection has been made.
ProgressBackgroundIndicatorWebSDKUIControl.IndicatorsDefaultIndicator applied to the background of the progress bar during upload processes.
ProgressBackgroundStyleGraffitiStyleNilGraffitiStyle applied to the background of the progress bar during upload processes.
ProgressForegroundIndicatorWebSDKUIControl.IndicatorsDefaultIndicator applied to the value and text displayed within the progress bar during upload processes.
ProgressForegroundStyleGraffitiStyleNilGraffitiStyle applied to the value and text displayed within the progress bar during upload processes.
ResetWhenCompleteBooleanFalseWhen True, the control will reset to no value when an upload has completed.
SelectButtonIndicatorWebSDKUIControl.IndicatorsDefaultIndicator applied to the select button.
SelectButtonStyleGraffitiStyleNilGraffitiStyle applied to the select button.
SelectButtonTextString“Select”Text or HTML within the select button.
SelectButtonTooltipString“Choose a file”Text displayed within the select button’s tooltip.
SelectButtonVisibleBooleanTrueDetermines whether the select button will be present in the control’s UI.
TemplateFileSelectedString“{name} ({size})”Template text that is parsed to display selection information.
TemplateProgressString“Uploading… {name} ({value})”Template text that is parsed to display upload progress information.
TemplateUploadCompleteString“Uploaded {name}”Template text that is parsed to display information when an upload has completed.
TextDragOverString“Drop file to select”Text or HTML displayed within the control’s label when a file is dragged over it.
TextFileRejectedString“Unsupported file type selected”Text or HTML displayed when the user has attempted to select or drop a file that is not allowed by the AcceptedTypes defined.
TextFileTooLargeString“File is too large”Text or HTML displayed when the user has attempted to select or drop a file that is larger than the MaximumFileSize property’s value.
TextNoValueString“No File Selected”Text or HTML displayed when no file is currently selected.
UploadButtonIndicatorWebSDKUIControl.IndicatorsDefaultIndicator applied to the Upload button.
UploadButtonStyleGraffitiStyleNilGraffitiStyle applied to the Upload button.
UploadButtonTextString“Upload”Text or HTML displayed in the upload button.
UploadButtonTooltipString“Begin uploading”Text displayed in the upload button’s tooltip.
UploadButtonVisibleBooleanTrueDetermines whether the upload button will be present in the control’s UI.
UploadPathFolderItemVaries by targetPath to store uploaded files.

Defaults
Xojo Cloud: SpecialFolder.Documents.Child( “com.graffitisuite.uploader” )
All others debug: SpecialFolder.Temporary.Child( “com.graffitisuite.uploader” )
All others built: SpecialFolder.ApplicationData.Child( “com.graffitisuite.uploader” )

Notes #

Template Tags #

The following words, when enclosed if curly braces, will be replaced with the currently selected file’s matching information:

  • name
  • size
  • value