# Can't dump File when uploading files

**URL:** <https://www.ruby-forum.com/t/cant-dump-file-when-uploading-files/207082>\
**Category:** Rails\
**Created:** [May 17, 2011, 11:02pm UTC](https://www.ruby-forum.com/t/cant-dump-file-when-uploading-files/207082 "2011-05-17T23:02:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 17, 2011, 11:02pm UTC](https://www.ruby-forum.com/t/cant-dump-file-when-uploading-files/207082/1 "2011-05-17T23:02:43Z")

</div>

I am getting this error on the redirect\_to command …

I am using Rails 3 w Paperclip to upload files ( but I tried also  
CarrierWave … same error)  
I tried to change the session store from cookie-based to database …  
same error  
I tried to delete the params content …  
I don’t know what to try next … any clue ?

thanks

erwin

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 18, 2011, 12:58am UTC](https://www.ruby-forum.com/t/cant-dump-file-when-uploading-files/207082/2 "2011-05-18T00:58:16Z")

</div>

On Tue, May 17, 2011 at 4:01 PM, Erwin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am getting this error on the redirect\_to command …
> 
> I am using Rails 3 w Paperclip to upload files ( but I tried also  
> CarrierWave .. same error)  
> I tried to change the session store from cookie-based to database ..  
> same error  
> I tried to delete the params content …  
> I don’t know what to try next .. any clue ?

You should post the full error, this is quite vague. Copy the trace from  
your console and someone may have some insight.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 18, 2011, 8:38am UTC](https://www.ruby-forum.com/t/cant-dump-file-when-uploading-files/207082/3 "2011-05-18T08:38:36Z")

</div>

Hi David  
I was re-running my test to output the trace , but I tested again  
another trick … by trying to delete directly the upload tempfile  
attribute of the ActionDispatch::Http::UploadedFile created instance  
before the redirect\_to …

params[:clip][:data].tempfile = nil  
redirect\_to …

and it’s running … so params[:clip][:data] = nil or  
params[:clip] = nil is not enough …
