# Uploading files in a special path

**URL:** <https://www.ruby-forum.com/t/uploading-files-in-a-special-path/92800>\
**Category:** Rails\
**Created:** [April 24, 2007, 10:55am UTC](https://www.ruby-forum.com/t/uploading-files-in-a-special-path/92800 "2007-04-24T10:55:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![massinissa\_mecharek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@massinissa\_mecharek](https://www.ruby-forum.com/u/massinissa_mecharek)\
**Post date:** [April 24, 2007, 10:55am UTC](https://www.ruby-forum.com/t/uploading-files-in-a-special-path/92800/1 "2007-04-24T10:55:06Z")

</div>

i have a table “upload\_files” i want to join a file when i insert e  
record in the table :

```
1* insert into upload_files information about the file uploaded and

```

who upload it upload\_files.save …

```
2*copy the file in a special path (massi/id/)

```

thanks

---

<div class="post-metadata">

**Author:** ![massinissa\_mecharek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@massinissa\_mecharek](https://www.ruby-forum.com/u/massinissa_mecharek)\
**Post date:** [April 24, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/uploading-files-in-a-special-path/92800/2 "2007-04-24T16:22:20Z")

</div>

massinissa mecharek wrote:

> i have a table “upload\_files” i want to join a file when i insert e  
> record in the table :
> 
> ```
> 1* insert into upload_files information about the file uploaded and
> 
> ```
> 
> who upload it upload\_files.save …
> 
> ```
> 2*copy the file in a special path (massi/id/)
> 
> ```
> 
> thanks

You may want to look into the Act\_as\_Attachment plugin for such task.  
You would have to override the full\_filename method however.
