Ultimate Uploader v1.4
JavaScript API Reference
 

Properties

Property name Type and acceptable values Description Setting example
ChunkMode integer (enumeration)
0 - Auto
1 - Manual
Mode defining automatically or manually the sizes of chunks will be designated. uploadController.ChunkMode = 1;
ChunkSize integer The size in bytes of the chunks sent to the server. uploadController.ChunkSize = 65536;
UploadHandler string URL of the handler that receives uploaded files. uploadController.UploadHandler = "upload.php";
MinFilesCount integer Minimum files count allowable for upload. uploadController.MinFilesCount = 4;
MaxFilesCount integer Maximum files count allowable for upload (0 or undefined - unlimited count). uploadController.MaxFilesCount = 12;
AvailableView integer (enumeration)
0 - Grid
1 - Thumbnails
2 - Both
Available view for the user interface.
"Grid" - only Grid View available.
"Thumbnails" - only Thumbnails View available.
"Both" - both Grid and Thumbnails Views available.
uploadController.AvailableView = 1;
MaxFileSize integer Maximum size in bytes of the file that can be uploaded to the server, 0 if unlimited. uploadController.MaxFileSize = 4194304;
ConcurrentUploads integer Maximum number of parallel uploads. uploadController.ConcurrentUploads = 3;
FileTypesFilter string Filter of file types allowed for upload to the server. uploadController.FileTypesFilter = "Jpeg images (*.jpg)|*.jpg";
ResizeImages boolean Indicating whether image should be resized before uploading. uploadController.ResizeImages = true;
UploadThumbnails boolean Indicating whether the thumbnails will be uploaded with images. uploadController.UploadThumbnails = false;
ImageSize integer Target size in pixels of the images if they need to be resized. uploadController.ImageSize = 1280;
ThumbnailSize integer Size in pixels of the image thumbnails if they have to be uploaded with images. uploadController.ThumbnailSize = 256;
JpegQuality integer Quality (from 1 to 100) of resized JPEG images and thumbnails. uploadController.JpegQuality = 95;
ThumbNameTemplate string Template of thumbnail files naming. Should contain "{0}" literal meaning an original filename, otherwise will be ignored. uploadController.ThumbNameTemplate = "_{0}";
HelpUrl string URL of help page opening at help button click. uploadController.HelpUrl = "docs.html";
ShowUploadButton boolean Defines whether the upload button should be displayed in the user interface. uploadController.ShowUploadButton = true;
ShowCancelButton boolean Defines whether the cancel button should be displayed in the user interface. uploadController.ShowCancelButton = true;
ShowHelpButton boolean Defines whether the help button should be displayed in the user interface. uploadController.ShowHelpButton = false;
ExistenceBehavior integer (enumeration)
0 - Resume
1 - Overwrite
2 - AskUser
Definers behavior of the program in case of file part existence. Acceptable values:
"Resume" - resume file uploading from point on which it has been interrupted earlier.
"Overwrite" - start file uploading over again, having rewritten existing file part.
"AskUser" - ask the user about what to do.
uploadController.ExistenceBehavior = 2;
AllowFileComments boolean Defines whether file comments should be allowed for users. uploadController.AllowFileComments = false;
Tag string Custom information that can be sent to server with files. uploadController.Tag = "gallery1";
QueuedFilesCount integer
(readonly)
Queued files count.  
UploadedFilesCount integer
(readonly)
Successfully uploaded files count.  

Methods

Method name Made operation GUI analog Calling example
StartUpload Start or resume upload process. Upload button uploadController.StartUpload();
PauseUpload Pause upload process. Pause button uploadController.PauseUpload();
CancelUpload Cancel upload process. Cancel button uploadController.CancelUpload();

Events

Event name Occurrence condition Event arguments Handler setting example
UploadStarted Start of upload process. no uploadController.UploadStarted = MyStartHandler;
UploadCompleted End of upload process. no uploadController.UploadCompleted = MyCompleteHandler;
UploadCancelled Cancellation of upload process. no uploadController.UploadCancelled = MyCancelHandler;
UploadPaused Pause of upload process. no uploadController.UploadPaused = MyPauseHandler;
UploadFileStarted Start of the specific file upload. string FileName
string FileSize (in bytes)
string ServerResponse
string FileComment
string Tag
uploadController.UploadFileStarted = MyFileStartHandler;
UploadFileCompleted End of the specific file upload. string FileName
string FileSize (in bytes)
string ServerResponse
string FileComment
string Tag
uploadController.UploadFileCompleted = MyFileCompleteHandler;