瀏覽代碼

Upgrade to release v4.1.2

Kartik Visweswaran 10 年之前
父節點
當前提交
aa89b5b395
共有 3 個文件被更改,包括 6 次插入4 次删除
  1. 4 2
      README.md
  2. 2 2
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 4 - 2
README.md

@@ -1003,11 +1003,12 @@ This event is triggered after upload is completed for each thumbnail file. Addit
 
 - `formdata`: the FormData object which is passed via XHR2.
 - `extraData`: the `uploadExtraData` settings for the plugin (will return an empty object if not set).
+- `responseData`: the data sent via ajax response.
 - `previewId`: the identifier of each file's parent thumbnail div element in the preview window.
 - `index`: the zero-based index of the file in the file stack.
 
 ```js
-$('#input-id').on('fileuploaded', function(event, formdata, extraData, preview, index) {
+$('#input-id').on('fileuploaded', function(event, formdata, extraData, responseData, preview, index) {
     console.log('File uploaded triggered');
 });
 ```
@@ -1031,9 +1032,10 @@ This event is triggered after a successful synchronous batch upload (i.e. when `
 
 - `filestack`: the array of selected file objects.
 - `extraData`: the `uploadExtraData` settings for the plugin (will return an empty object if not set).
+- `responseData`: the data sent via ajax response.
 
 ```js
-$('#input-id').on('filebatchuploadsuccess', function(formdata, extraData) {
+$('#input-id').on('filebatchuploadsuccess', function(formdata, extraData, responseData) {
     console.log('File batch upload success');
 });
 ```

+ 2 - 2
js/fileinput.js

@@ -898,7 +898,7 @@
                             $btnUpload.hide();
                             $btnDelete.hide();
                             self.filestack[i] = undefined;
-                            self.$element.trigger('fileuploaded', [formdata, self.uploadExtraData, previewId, i]);
+                            self.$element.trigger('fileuploaded', [data, formdata, self.uploadExtraData, data, previewId, i]);
                         } else {
                             setIndicator('indicatorError', 'indicatorErrorTitle');
                             self.showUploadError(data.error, formdata, self.uploadExtraData, previewId, i);
@@ -971,7 +971,7 @@
                             } else {
                                 self.reset();
                             }
-                            self.$element.trigger('filebatchuploadsuccess', [self.filestack, self.uploadExtraData]);
+                            self.$element.trigger('filebatchuploadsuccess', [self.filestack, self.uploadExtraData, data]);
                         } else {
                             self.$preview.find('.file-preview-frame').each(function() {
                                 var $thumb = $(this), key = $thumb.attr('data-fileindex');

File diff suppressed because it is too large
+ 0 - 0
js/fileinput.min.js


Some files were not shown because too many files changed in this diff