file-flash.js revision 70837a7c5871ea73a84ab67d8c34fcd9d2daa31c
/**
* The FileFlash class provides a wrapper for a file pointer stored in Flash. The File wrapper
* also implements the mechanics for uploading a file and tracking its progress.
* @module file-flash
*/
/**
* The class provides a wrapper for a file pointer in Flash.
* @class FileFlash
* @extends Base
* @constructor
*/
var FileFlash = function(o) {
};
initializer : function (cfg) {
if (!this.get("id")) {
}
},
_swfEventHandler: function (event) {
case "uploadstart":
break;
case "uploadprogress":
});
break;
case "uploadcomplete":
break;
case "uploadcompletedata":
break;
case "uploadcancel":
break;
case "uploaderror":
}
}
},
/**
* Starts the upload of a specific file.
*
* @method startUpload
* @param url {String} The URL to upload the file to.
* @param parameters {Object} (optional) A set of key-value pairs to send as variables along with the file upload HTTP request.
* @param fileFieldName {String} (optional) The name of the POST variable that should contain the uploaded file ('Filedata' by default)
* @return {Boolean} This method always returns true.
*/
if (this.get("uploader")) {
params = parameters || null;
}
},
/**
* Cancels the upload of a specific file, if currently in progress.
*
* @method cancelUpload
*/
cancelUpload: function () {
if (this.get("uploader")) {
}
},
}, {
NAME: 'file',
TYPE: "flash",
ATTRS: {
id: {
writeOnce: "initOnly",
value: null
},
size: {
writeOnce: "initOnly",
value: 0
},
name: {
writeOnce: "initOnly",
value: null
},
dateCreated: {
writeOnce: "initOnly",
value: null
},
dateModified: {
writeOnce: "initOnly",
value: null
},
readOnly: true,
value: 0
},
type: {
writeOnce: "initOnly",
value: null
},
file: {
writeOnce: "initOnly",
value: null
},
uploader: {
writeOnce: "initOnly",
value: null
},
readOnly: true,
value: null
}
}
});