<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: SWFUpload, Paperclip and Ruby on Rails</title>
	<atom:link href="http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/</link>
	<description>Ruby on Rails, Javascript, CSS and Standards</description>
	<pubDate>Fri, 05 Sep 2008 21:36:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Harm</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-538</link>
		<dc:creator>Harm</dc:creator>
		<pubDate>Mon, 25 Aug 2008 07:26:21 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-538</guid>
		<description>@Kevin Thanks a bunch! That Safari bug was really driving me insane. Works perfectly with the quoting!</description>
		<content:encoded><![CDATA[<p>@Kevin Thanks a bunch! That Safari bug was really driving me insane. Works perfectly with the quoting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nap</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-533</link>
		<dc:creator>nap</dc:creator>
		<pubDate>Thu, 14 Aug 2008 02:00:19 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-533</guid>
		<description>Oh man that was mangled pretty badly... Hopefully this will work:

&lt;code&gt;
upload_url: "?_yourappname_session=&#38;authenticity_token="
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Oh man that was mangled pretty badly&#8230; Hopefully this will work:</p>
<p><code><br />
upload_url: "?_yourappname_session=&amp;authenticity_token="<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nap</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-532</link>
		<dc:creator>nap</dc:creator>
		<pubDate>Thu, 14 Aug 2008 01:59:14 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-532</guid>
		<description>oh man that was mangled pretty badly... Maybe this will work (or please correct in moderation):

upload_url: "\?_yourappname_session=\\&#38;authenticity_token=\"</description>
		<content:encoded><![CDATA[<p>oh man that was mangled pretty badly&#8230; Maybe this will work (or please correct in moderation):</p>
<p>upload_url: &#8220;\?_yourappname_session=\\&amp;authenticity_token=\&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nap</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-531</link>
		<dc:creator>nap</dc:creator>
		<pubDate>Thu, 14 Aug 2008 01:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-531</guid>
		<description>Anyone using Rails 2.1 may run into the issue that Session IDs are multi-line...  In SWFU object setup, if you need to pass the session id by hand, you can specify it like this:

    upload_url: "?_yourapp_session=&#38;authenticity_token="</description>
		<content:encoded><![CDATA[<p>Anyone using Rails 2.1 may run into the issue that Session IDs are multi-line&#8230;  In SWFU object setup, if you need to pass the session id by hand, you can specify it like this:</p>
<p>    upload_url: &#8220;?_yourapp_session=&amp;authenticity_token=&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Andrews</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-529</link>
		<dc:creator>James Andrews</dc:creator>
		<pubDate>Sun, 10 Aug 2008 04:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-529</guid>
		<description>For anyone wanting to get this working quickly on Rails 2.1, a simple fix for the InvalidAuthenticityToken error is to add:

skip_before_filter :verify_authenticity_token

to the top of your attachments/photos controller, rather than disabling protect_from_forgery across your whole application.</description>
		<content:encoded><![CDATA[<p>For anyone wanting to get this working quickly on Rails 2.1, a simple fix for the InvalidAuthenticityToken error is to add:</p>
<p>skip_before_filter :verify_authenticity_token</p>
<p>to the top of your attachments/photos controller, rather than disabling protect_from_forgery across your whole application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colby</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-520</link>
		<dc:creator>Colby</dc:creator>
		<pubDate>Mon, 28 Jul 2008 22:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-520</guid>
		<description>I'm also getting the InvalidAuthenticityToken error. I've tried passing it as a post_param and as part of the URL, but nothing seems to be satisfactory. Anyone have an idea of what's going on there yet?</description>
		<content:encoded><![CDATA[<p>I&#8217;m also getting the InvalidAuthenticityToken error. I&#8217;ve tried passing it as a post_param and as part of the URL, but nothing seems to be satisfactory. Anyone have an idea of what&#8217;s going on there yet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: masone</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-509</link>
		<dc:creator>masone</dc:creator>
		<pubDate>Thu, 17 Jul 2008 18:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-509</guid>
		<description>@lardawge: As a quick workaround you could rename the image in a before_save filter and set the new image path to the database as well.</description>
		<content:encoded><![CDATA[<p>@lardawge: As a quick workaround you could rename the image in a before_save filter and set the new image path to the database as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stag</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-495</link>
		<dc:creator>Stag</dc:creator>
		<pubDate>Wed, 16 Jul 2008 01:47:28 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-495</guid>
		<description>I too am having trouble with an ActionController::InvalidAuthenticityToken error.  The rails project im using this with uses a login and hence has a user_id in the session.

I found I had to comment out my protect_from_forgery in the application controller to get it to work but that just left me with a "couldnt find user without id" error.

I like the look of delagoya's solution as im working with post_params already but putting  " session_data: “” " in there didnt accomplish anything for me.

I also used post_params to put in the authenticity token but got no result with that either.  
For anyone whos interested the token can be got with: 
$('#form-id div input').val()
replacing form-id with the forms id :P

Anyways any help would be greatly appreciated.</description>
		<content:encoded><![CDATA[<p>I too am having trouble with an ActionController::InvalidAuthenticityToken error.  The rails project im using this with uses a login and hence has a user_id in the session.</p>
<p>I found I had to comment out my protect_from_forgery in the application controller to get it to work but that just left me with a &#8220;couldnt find user without id&#8221; error.</p>
<p>I like the look of delagoya&#8217;s solution as im working with post_params already but putting  &#8221; session_data: “” &#8221; in there didnt accomplish anything for me.</p>
<p>I also used post_params to put in the authenticity token but got no result with that either.<br />
For anyone whos interested the token can be got with:<br />
$(&#8217;#form-id div input&#8217;).val()<br />
replacing form-id with the forms id :P</p>
<p>Anyways any help would be greatly appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Neath</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-433</link>
		<dc:creator>Jim Neath</dc:creator>
		<pubDate>Wed, 09 Jul 2008 08:14:26 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-433</guid>
		<description>@delagoya - I've not actually tried that. I'll have a play around with it and update the sample app.

@lardawge - I've not actually tried doing anything like that yet. You may be able to use a Proc but I'm not sure yet. I'll have a look into it and let you know.</description>
		<content:encoded><![CDATA[<p>@delagoya - I&#8217;ve not actually tried that. I&#8217;ll have a play around with it and update the sample app.</p>
<p>@lardawge - I&#8217;ve not actually tried doing anything like that yet. You may be able to use a Proc but I&#8217;m not sure yet. I&#8217;ll have a look into it and let you know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lardawge</title>
		<link>http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/#comment-431</link>
		<dc:creator>lardawge</dc:creator>
		<pubDate>Tue, 08 Jul 2008 19:59:03 +0000</pubDate>
		<guid isPermaLink="false">http://jimneath.org/?p=23#comment-431</guid>
		<description>Jim,
Couple questions-

1. Any way to rename the files? Say for example if I had a form with 'first_name' 'last_name'. Is there a way to rename each file 1-first_name.jpeg, 2-first-name.jpeg, ect. 

2. Along the same lines, folder naming/directory. Folder= first_name+last_name?

I know it may be slightly outside the scope of what you are trying to do here but any tips pointers would be appreciated.</description>
		<content:encoded><![CDATA[<p>Jim,<br />
Couple questions-</p>
<p>1. Any way to rename the files? Say for example if I had a form with &#8216;first_name&#8217; &#8216;last_name&#8217;. Is there a way to rename each file 1-first_name.jpeg, 2-first-name.jpeg, ect. </p>
<p>2. Along the same lines, folder naming/directory. Folder= first_name+last_name?</p>
<p>I know it may be slightly outside the scope of what you are trying to do here but any tips pointers would be appreciated.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
