ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
[![Uploadify - JQuery File Upload Plugin Script](https://box.kancloud.cn/2015-11-02_5636cc82d8b6c.png)](http://www.uploadify.com) # onComplete Input Type:**function** Input Format:**function(event, ID, fileObj, response, data) {}** Required:**optional** The **onComplete** function allows you to fire a custom function when each file has completed uploading. The default function marks the file queue item as complete and if the **removeCompleted** option is enabled, will remove the file queue item from the queue. If the custom function returns **false**, the default function will not run. ### Arguments **event** The event object. **ID** The unique ID of the file queue item. **fileObj** An object containing the file information. - **[name]** - The name of the uploaded file - **[filePath]** - The path on the server to the uploaded file**** - **[size]** - The size in bytes of the file**** - **[creationDate]** - The date the file was created**** - **[modificationDate]** - The last date the file was modified**** - **[type]** - The file extension beginning with a '.' **response** The text response sent back from the back-end upload script. **data** An object containing general data about the upload and the queue. - **[fileCount]** - The number of files remaining in the queue - **[speed]** - The average speed pf the file upload in KB/s ### Demo Javascript Code 1. $('#file_upload').uploadify({ 1.   'uploader'    : '/uploadify/uploadify.swf', 1.   'script'      : '/uploadify/uploadify.php', 1.   'cancelImg'   : '/uploadify/cancel.png', 1.   'folder'      : '/uploads', 1.   'multi'       : true, 1.   'onComplete'  : function(event, ID, fileObj, response, data){ 1.       alert('There are ' + data.fileCount + ' files remaining in the queue.'); 1.     } 1. }); HTML Code 1. <inputtype="file"id="file_upload"name="file_upload"/> 1. <ahref="javascript:$('#file_upload').uploadifyUpload();">Upload Files</a> [Upload Files](#) [![Download the Latest Version](https://box.kancloud.cn/2015-11-02_5636cc82ea7d9.png)](#) Help keep Uploadify free and support the development of other excellent apps! ![](../image/564003e134a72.gif) [home](#)  |  [about](#)  |  [download](#)  |  [demos](#)  |  [documentation](#)  |  [faqs](#)  |  [forums](#) ©2011 by [Reactive Apps](http://www.reactiveapps.com)