onAfterFileAdd
fires after a file has been added to the uploader body
void onAfterFileAdd(object file){ ... };
Parameters
file | object | an object with the file data |
Example
$$("uploader_1").attachEvent("onAfterFileAdd", function(file){
//... some code here ...
});
Details
The file object contains the following properties:
- id - the file ID generated automatically with the webix.uid() method per each uploading session;
- name - the file title and extension;
- percent - the indicator of the loading progress;
- size - the size of the file in bytes (as a number);
- sizetext - the size of the file as a string, like "522Kb";
- sname - the file name under which it was saved on server;
- status - the upload status that changes during uploading:
- "client" - the file is added to the uploader body on the client side, the uploading hasn't been started yet or was aborted by a user;
- "transfer" - the file uploading is in progress;
- "server" - the file has been successfully uploaded;
- "error" - an error occurred during uploading.
- type - the file extension.
See also
Back to top