Skip to content

Commit f5a1e76

Browse files
author
Pietro Donatini
committed
1 parent d757ba8 commit f5a1e76

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/controllers/uploads_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def create
4949
:content_type => 'text/html',
5050
:layout => false
5151
}
52-
format.json { render json: [@upload.to_jq_upload].to_json, status: :created, location: @upload }
52+
format.json { render json: {files: [@upload.to_jq_upload]}, status: :created, location: @upload }
5353
else
5454
format.html { render action: "new" }
5555
format.json { render json: @upload.errors, status: :unprocessable_entity }

app/views/uploads/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
//
120120
// Load existing files:
121121
$.getJSON($('#fileupload').prop('action'), function (files) {
122-
var fu = $('#fileupload').data('fileupload'),
122+
var fu = $('#fileupload').data('blueimpFileupload'),
123123
template;
124124
fu._adjustMaxNumberOfFiles(-files.length);
125125
console.log(files);

0 commit comments

Comments
 (0)