onAfterFileAdd

fires after a file has been added to the uploader body

void onAfterFileAdd(object file);
fileobjectan object with the file data

Example

$$("uploader_1").attachEvent("onAfterFileAdd", function(file){
    //... some code here ... 
});

Details

The file object contains the following properties:

  • id (number) - the file ID generated automatically with the webix.uid() method per each uploading session
  • name (string) - the file title and extension
  • file (object) - File object
  • percent (number) - the indicator of the loading progress
  • size (number) - the size of the file in bytes (as a number)
  • sizetext (string) - the size of the file as a string, like "522Kb"
  • sname (string) - the file name under which it was saved on server
  • status (string) - 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 (string) - the file extension.
See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.