# Filename prefixes in file\_column

**URL:** <https://www.ruby-forum.com/t/filename-prefixes-in-file-column/126137>\
**Category:** Rails\
**Created:** [January 15, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/filename-prefixes-in-file-column/126137 "2008-01-15T19:19:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![piyush\_r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/73ab20/32.png) [@piyush\_r](https://www.ruby-forum.com/u/piyush_r)\
**Post date:** [January 15, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/filename-prefixes-in-file-column/126137/1 "2008-01-15T19:19:25Z")

</div>

I need to add filename prefix to files uploaded by file\_column plugin.  
For  
instance the image file uploaded by the user is by name ‘foobar.jpg’  
I need to prefix this image with a random number(‘23\_foobar.jpg’). I  
need to  
write this prefixed name to database too.  
Is there any way to do this ?

---

<div class="post-metadata">

**Author:** ![piyush\_r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/73ab20/32.png) [@piyush\_r](https://www.ruby-forum.com/u/piyush_r)\
**Post date:** [January 16, 2008, 9:01am UTC](https://www.ruby-forum.com/t/filename-prefixes-in-file-column/126137/2 "2008-01-16T09:01:50Z")

</div>

Am I missing something very obvious here ?  
Please help
