# Uploading files... managing lots of files

**URL:** <https://www.ruby-forum.com/t/uploading-files-managing-lots-of-files/116235>\
**Category:** Rails\
**Created:** [October 3, 2007, 6:16pm UTC](https://www.ruby-forum.com/t/uploading-files-managing-lots-of-files/116235 "2007-10-03T18:16:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdruse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Post date:** [October 3, 2007, 6:16pm UTC](https://www.ruby-forum.com/t/uploading-files-managing-lots-of-files/116235/1 "2007-10-03T18:16:29Z")

</div>

hello all,

i run a website for a school, and on the site there’s space for teachers  
to upload files for students to download them. the system is working  
great and everyone is real happy with it. i store the files in a folder  
in the app’s directory. so here’s my problem. the folder is getting  
really big… there’s 1200+ files in the folder and the total size is  
(compressed) over 1G. does anyone else do this kind of thing? if so, how  
do you do it? any tips, pointers, or suggestions are much appreciated.

Jon

---

<div class="post-metadata">

**Author:** ![jdruse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Post date:** [October 3, 2007, 6:22pm UTC](https://www.ruby-forum.com/t/uploading-files-managing-lots-of-files/116235/2 "2007-10-03T18:22:43Z")

</div>

If you are using acts\_as\_attachment (or attachment\_fu) to upload the  
files then you can use this strategy to create more directories.  
[http://blog.spotstory.com/2006/11/10/extending-acts\_as\_attachment/](http://blog.spotstory.com/2006/11/10/extending-acts_as_attachment/)

If not, I would recommend using attachment\_fu to do uploads.

-bakki

---

<div class="post-metadata">

**Author:** ![jdruse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Post date:** [October 3, 2007, 8:41pm UTC](https://www.ruby-forum.com/t/uploading-files-managing-lots-of-files/116235/3 "2007-10-03T20:41:14Z")

</div>

> -----Original Message-----  
> From: removed\_email\_address@domain.invalid [mailto:rubyonrails-  
> removed\_email\_address@domain.invalid] On Behalf Of Jon D.

> so here’s my problem. the folder is getting  
> really big… there’s 1200+ files in the folder and the total size is  
> (compressed) over 1G.

What is the actual problem that you or your users are experiencing, of  
which  
this may be the cause?

///ark

---

<div class="post-metadata">

**Author:** ![jdruse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Post date:** [October 4, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/uploading-files-managing-lots-of-files/116235/4 "2007-10-04T23:18:14Z")

</div>

Are you aware of amazon s3? That may be a possible solution for any  
storage problems…

---

<div class="post-metadata">

**Author:** ![jdruse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Post date:** [October 5, 2007, 2:10am UTC](https://www.ruby-forum.com/t/uploading-files-managing-lots-of-files/116235/5 "2007-10-05T02:10:08Z")

</div>

On 10/3/07, Bakki K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> If you are using acts\_as\_attachment (or attachment\_fu) to upload the  
> files then you can use this strategy to create more directories.  
> [http://blog.spotstory.com/2006/11/10/extending-acts\_as\_attachment/](http://blog.spotstory.com/2006/11/10/extending-acts_as_attachment/)
> 
> If not, I would recommend using attachment\_fu to do uploads.

Or just use the latest version of attachment\_fu, it does that by  
default.

–  
Rick O.  
[http://lighthouseapp.com](http://lighthouseapp.com)  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)
