> Thanks so much for you help with the problem and the suggestion with
> new version of swfupload!
> 
> I don't suppose you have any clear insight into why I can't get the
> InvalidAuthorizationToken thing to work do you?

My guess is you're not passing it along via Flash.  See this bit in 
app/views/home/index.html.erb where I invoke the swfupload object.  See where 
it's passing the session key and the authenticity token?  That's important.  
And also why you need that middleware stuff.  

  $(document).ready(function() {
    swfu = new SWFUpload({
      upload_url                   : "<%= upload_path %>",
      file_post_name               : "Filedata",
      post_params                  : {
                                      "<%= key = 
ActionController::Base.session_options[:key] %>" : "<%= cookies[key] %>",
                                      "<%= request_forgery_protection_token %>" 
   : "<%= form_authenticity_token %>"
                                     },




> Thanks once again for help already given and any more you might be
> able to offer

No problem!

-philip



> Darren
> 
> On May 18, 8:01 pm, Philip Hallstrom <[email protected]> wrote:
>> 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 
>> athttp://groups.google.com/group/rubyonrails-talk?hl=en.
> 
> -- 
> 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.
> 

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