Example breaks against latest gem
When upgrading to the latest main gem https://github.com/tors/jquery-fileupload-rails the javascript no longer works
Uncaught TypeError: Cannot call method '_adjustMaxNumberOfFiles' of undefined
Reverting to the gem version specified in this example fixes it, I kept all other gem files static
Same here!
@rschmitty - try this. It turned out that all I had to do to get this example working and get rid of that error was changing this line
format.json { render json: [@upload.to_jq_upload].to_json, status: :created, location: @upload }
to:
format.json { render json: {files: [@upload.to_jq_upload]}, status: :created, location: @upload }
And I made the same thing on my app.
ah cool thanks @Rogerio! I'll leave this open so author is aware
I, this change, putting files: [..., resolves the problem after the create, but I still can't see the ready for download files, the ones that we already uploaded. I can see by the log that they are saved, but never showned. I still get the error Uncaught TypeError: Cannot call method '_adjustMaxNumberOfFiles' of undefined.
any ideias?
https://github.com/tors/jquery-fileupload-rails/issues/30#issuecomment-15956287