Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Example breaks against latest gem #13

Open
rschmitty opened this issue Feb 26, 2013 · 5 comments
Open

Example breaks against latest gem #13

rschmitty opened this issue Feb 26, 2013 · 5 comments

Comments

@rschmitty
Copy link

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

@Rogerio
Copy link

Rogerio commented Mar 1, 2013

Same here!

@Rogerio
Copy link

Rogerio commented Mar 1, 2013

@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.

@rschmitty
Copy link
Author

ah cool thanks @Rogerio! I'll leave this open so author is aware

@brunomac
Copy link

brunomac commented Mar 7, 2013

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?

@klausistblau
Copy link

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants