# File\_column not working properly

**URL:** <https://www.ruby-forum.com/t/file-column-not-working-properly/111399>\
**Category:** Rails\
**Created:** [August 6, 2007, 11:00pm UTC](https://www.ruby-forum.com/t/file-column-not-working-properly/111399 "2007-08-06T23:00:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmehta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Post date:** [August 6, 2007, 11:00pm UTC](https://www.ruby-forum.com/t/file-column-not-working-properly/111399/1 "2007-08-06T23:00:13Z")

</div>

Hello,

In my application, I have to show a form to allow updating a table row  
and also upload a logo file related to that row. The db record only  
needs to save the filename and file could be saved anywhere else on the  
server. In my controller I have to validate other fields and if they are  
valid only then upload the file and update the db also.

I am trying to use file\_column for upload and it does save the file in  
tmp folder. But the problem is that it is not saved in the folder as  
defined by the file\_column plugin. It is saved only when I come back to  
the same screen and submit the form again, only then it is deleted from  
tmp and saved at the proper location.

Now, what am I doing wrong here? Why does the form needs to be submitted  
again? Somewhere on this forum I read that I need to use  
update\_attributes to update the db. But even that causes the same  
result.

Any help will be appreciated very much.

Thanks.
