# Attachment fu file path

**URL:** <https://www.ruby-forum.com/t/attachment-fu-file-path/184069>\
**Category:** Rails\
**Created:** [February 24, 2010, 3:38pm UTC](https://www.ruby-forum.com/t/attachment-fu-file-path/184069 "2010-02-24T15:38:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![srikanth\_j](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a5b964/32.png) [@srikanth\_j](https://www.ruby-forum.com/u/srikanth_j)\
**Post date:** [February 24, 2010, 3:38pm UTC](https://www.ruby-forum.com/t/attachment-fu-file-path/184069/1 "2010-02-24T15:38:09Z")

</div>

Hi I am using attachment fu plugin for uploading data.

say : User has\_many :photos

I wanted to save the uploaded photo in the path as follows.

/files/\<user\_id\>/photos/1.jpg - while uploading first photo  
/files/\<user\_id\>/photos/2.jpg - while uploading second photo

1. Is there any way to make a folder name with user id ?
2. Is there any way to rename the file in sequential order ?

Thanks in advance,  
srikanth

> **[Srikanth Jeeva's technical Blog](http://www.srikanthjeeva.com/)**
>
> my blog is abt wht i have learnt technically, mostly in Ruby on Rails, Javascript, node.js 
> hope this share a little bit of info & adds a bit stuff., 
> Thanks.
