# New wiki page: Installing page\_attachments

**URL:** <https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778>\
**Category:** Radiant CMS\
**Created:** [June 2, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778 "2007-06-02T17:42:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 2, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/1 "2007-06-02T17:42:06Z")

</div>

For those of you having difficulty installing and configuring  
page\_attachments:

[http://dev.radiantcms.org/radiant/wiki/InstallingPageAttachments](http://dev.radiantcms.org/radiant/wiki/InstallingPageAttachments)

Mangia!

Sean  
p.s. I would appreciate any contributions to this page if I left  
something out.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 4, 2007, 8:29pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/2 "2007-06-04T20:29:04Z")

</div>

Thanks for this. The extension works great and just saved me a lot of  
work 🙂

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 4, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/3 "2007-06-04T20:31:53Z")

</div>

David P. wrote:

> Thanks for this. The extension works great and just saved me a lot of  
> work 🙂

My pleasure. I wrote it for myself, and I’m glad when it works for  
others.

Sean

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 4, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/4 "2007-06-04T21:06:02Z")

</div>

That’s part of attachment\_fu (which is included in page\_attachments).  
It’s a folder namespacing so that you could potentially have millions of  
uploaded files.

Sean

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 4, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/5 "2007-06-04T20:57:07Z")

</div>

I’m just curious as to what the 0000 directory is for?  
/page\_attachments/0000/0001/atestimg.jpg

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 4, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/6 "2007-06-04T21:23:02Z")

</div>

Like…  
/0000/9999/  
/0001/0001/  
/0001/0002/  
Gotcha.

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 6, 2007, 9:08pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/7 "2007-06-06T21:08:08Z")

</div>

FYI, page\_attachments allows you to upload multiple files of the same  
filename to page(s) in the same page/child scope. While this is not a  
problem when storing the files (because of the nested folder structure),  
it is a problem when trying to access the files. Example:

/0000/0001/myfile.pdf  
/0000/0002/myfile.pdf

\<r:attachment:link name=“myfile.pdf” /\>

How does the tag know which file to choose?

---

<div class="post-metadata">

**Author:** ![smc7000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Post date:** [June 6, 2007, 9:21pm UTC](https://www.ruby-forum.com/t/new-wiki-page-installing-page-attachments/105778/8 "2007-06-06T21:21:34Z")

</div>

David P. wrote:

> How does the tag know which file to choose?

Ah, good point. We need some validations on that. Right now, it’s  
going to pick the first it finds, which is totally DBMS dependent (MySQL  
will auto-order by id).

Sean
