I am using Rails Carrier Wave with JQuery Upload like on this rails tutorial, but I am having an error when I hit the upload button :
Error: SyntaxError: JSON.parse
Any advise/suggestions are much appriciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why not try Uploadify?
Step 1
Add
gem 'carrier_wave'to you Gemfile.Step 2
Save this code to
/lib/flash_session_cookie_middleware.rb:Step 3
Edit
session_store.rband add this code to the end of file:Step 4
Download Uploadify and unzip it.
Step 5
jquery.uploadify.v2.1.4.min.jsandswfobject.jsto/app/assets/javascriptsif you use Rails 3.1 or later; to/public/javascriptsif you use Rails 3.0 or an earlier version.uploadify.swfandcancel.pngto/app/assets/images/or/public/images.uploadify.cssto/app/assets/stylesheets/or/public/stylesheets.Step 6
Edit your application.js and insert below:
Step 7
In you upload page, add this:
Step 8
Add this code to you upload script:
Step 9
Write your controller like this:
Note: This was tested with Uploadify 2.1.4.