On May 18, 2010, at 11:10 AM, Ruby on Rails: Talk wrote:

> Hi
> 
> I'm sure this is in the wrong group - so any suggestions for a right
> group would be great! And you have my express permission to treat me
> like an idiot in replies! I have a fair amount of knowledge ...
> but ... obviously not enough to understand this past the basics!
> 
> I have two problems ... but only going to list one for now ...
> 
> I'm trying to use the Jim Neath code and examples with swfupload and
> not having much success.
> 
> I'm using Rails 2.3.5 if that's any use.
> 
> I've already had to do this in my PhotosController:
> 
> skip_before_filter :verify_authenticity_token, :only => :create
> 
> just to get the app to ignore {play nicely?) with the
> InvalidAuthenticityToken problems! And I promise I've read EVERY post
> there is on the problem from Google and beyond. I've changed more code
> try to solve the InvalidAuthenticityToken than I think Microsoft have
> ever produced ... and still no help. More on this in another post ...

I recently configured swfupload with Rails using the beta3 of swfupload so I 
could have it to client side image resizing.

Take a look at this rails demo app:

http://philip.pjkh.com/swfupload-rails-resize-demo.tgz

It's everything you need to get it going.  If you don't want the client side 
image resizing, just comment out the bits that invoke it.  The swfupload 
handlers are setup to simply print out debugging information so you can see 
when/why/where they get called.

Just run 'rake db:migrate' to setup the sqlite database.

In particular though... look at these files/lines...

app/middleware/flash_session_cookie_middleware.rb
config/environment.rb - 2nd to last line
config/initializers/session_store.rb - last line
app/models/photo.rb 
app/controllers/home_controller.rb 
app/views/home/index.html.erb 
public/javascripts/swfupload_handlers.js 

-philip


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to