Core Docs | Additional Modules Docs
@Description: Instantiates a new upload
@File: upload.js
@Example:var uploader = new sb.upload({
debug : true,
maxFiles : 5,
maxFileSizeK : 5000000,
url : 'http://framework.sv/post',
data : {
friend : 'tim',
nano : "Hello there timmy's dog"
},
onReturnData : function(file){},
onExceedsMaxFiles : function(){},
onExceedsMaxFileSizeK : function(file){},
onError : function(data){
alert(data.message);
}
});
uploader.browse();
@Description: Cancels any upload currently in process in any sb.upload instance
@File: upload.js
@Description: The accepted file types/names as a string e.g. '*.jpg;*.png;'
@File: upload.js
@Description: Starts the file upload by prompting the user with a file browse box
@File: upload.js
@Description: Additional data objectw hich is url encoded into post data and sent with the files
@File: upload.js
@Description: Determines if file upload debug info is traced to the flash debug player
@File: upload.js
@Description: The maximum file size per file that the user can upload before it throws an error and fires onMaxFileSizeExceeded
@File: upload.js
@Description: The maximum number of files the user can select in the browser before it throws an error and fires onMaxFilesExceeded
@File: upload.js
@Description: Fires when all uploads for this upload instance are complete
@File: upload.js
@Param: object files.total
@Description: Fires each time one more file is uploaded until the que is empty
@File: upload.js
@Param: object files.total, files.remaining
@Description: Fires once when the upload que is canceled using upload.cancel();
@File: upload.js
@Description: Fires when the user hits cancel in the file browser
@File: upload.js
@Description: Fires when one file in the que is canceled by filename with upload.cancel(file.name); or once per file when upload.cancel()l is fired without a name specified
@File: upload.js
@Param: object file.name
@Description: Fires when a file is done uploading, must beturn something from the serer for this to fire, can be a simple space
@File: upload.js
@Param: object file.name, file.size, file.sizeK, file.type
@Description: Fires if the upload is canceled due to an error
@File: upload.js
@Param: object file.name, file.size, file.sizeK, file.type, file.error
@Description: Fires when a file exceeds the maximum file size specified and is therefore not uplaoded
@File: upload.js
@Param: object file file.name, file.size, file.sizeK, file.exceededBy, file.limit, file.message
@Description: Fires when a user selects too many files
@File: upload.js
@Param: object files.chosen, files.limit, files.message
@Description: Fires when the file is opened for upload on the client's computer
@File: upload.js
@Param: object file.name, file.size, file.sizeK, file.type
@Description: Fires periodically as a file uploads alerting you of the progress in percent, deosn't seem to fire for really quick uploads on local server, must return something from the serer for this to fire, can be a simple space
@File: upload.js
@Param: object file.name, file.size, file.sizeK, file.type, file.bytesLoaded, file.bytesTotal, file.percent
@Description: Fires when the data is returned from the server, , must beturn something from the serer for this to fire, can be a simple space
@File: upload.js
@Param: object file.name, file.size, file.sizeK, file.type, file.data
@Description: Fires when the user selects files from the browse box that pops up when you begin an upload
@File: upload.js
@Param: object files.total
@Description: The URL to upload the data to
@File: upload.js
@Description: Cancels all file uploads for this instance
@File: upload.js