* Fire before select file
* @param {Roo.bootstrap.DocumentManager} this
*/
- "beforeselectfile" : true
+ "beforeselectfile" : true,
+ /**
+ * @event process
+ * Fire before process file
+ * @param {Roo.bootstrap.DocumentManager} this
+ * @param {Object} file
+ */
+ "process" : true
});
};
process : function(file)
{
- if(this.editable && file.type.indexOf('image') != -1){
- this.fireEvent('edit', this, file);
+ if(this.fireEvent('process', this, file) !== false){
+ if(this.editable && file.type.indexOf('image') != -1){
+ this.fireEvent('edit', this, file);
+ return;
+ }
+
+ this.uploadStart(file, false);
+
return;
}
- this.uploadStart(file, false);
-
- return;
},
uploadStart : function(file, crop)