🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[![Uploadify - JQuery File Upload Plugin Script](https://box.kancloud.cn/2015-11-02_5636cc82d8b6c.png)](http://www.uploadify.com) # onProgress Input Type:**function** Input Format:**function(event,ID,fileObj,data) {}** Required:**optional** The **onProgress** option allows you to fire a function each time to progress of a file upload changes. The default function updates the length of the progress bar and percentage displayed. If the custom function returns **false**, the default function will not run. ### Arguments **event ** The event object. **ID **The unique identifier of the file being uploaded.**** **fileObj **An object containing details about the file that was selected. - **[name]** - The name of the 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 '.'**** **data** An object containing details about the upload and queue. - **[percentage]** - The current percentage completed for the upload**** - **[bytesLoaded]** - The current amount of bytes uploaded**** - **[allBytesLoaded]** - The current amount of bytes loaded for all files in the queue**** - **[speed]** - The current upload speed 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.   'removeCompleted' : false, 1.   'onProgress'  : function(event,ID,fileObj,data){ 1.       var bytes = Math.round(data.bytesLoaded/1024); 1.       $('#' + $(event.target).attr('id') + ID).find('.percentage').text(' - ' + bytes + 'KB Uploaded'); 1.       returnfalse; 1.     } 1. }); HTML Code 1. <style>.uploadifyProgress{display:none;}</style> 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/564003e15c8c5.gif) [home](#)  |  [about](#)  |  [download](#)  |  [demos](#)  |  [documentation](#)  |  [faqs](#)  |  [forums](#) ©2011 by [Reactive Apps](http://www.reactiveapps.com)