# Page\_part\_types multiple uploads

**URL:** <https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058>\
**Category:** Radiant CMS\
**Created:** [September 8, 2006, 8:12pm UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058 "2006-09-08T20:12:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [September 8, 2006, 8:12pm UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/1 "2006-09-08T20:12:48Z")

</div>

I don’t know if anyone else is using this, but dror’s multiple upload  
type is exactly what I need for a client’s site that should have been  
done on Monday. Except I can’t make it work. The initial upload goes  
great, I just upload over 70 pictures into one gallery. i even got it  
to spit our xml fo rsome flash stuff.

So far so good. But if I add images, it gives me an error. I have  
fought with this all week, and gotten nowhere. The part page, for  
some reason creates a second part, with no name and then I cannot  
save. Once I upload a gallery, I cannot save ANYTHING in that page  
again, because of this part. I have tracked it down to a mysterious  
second iframe which gets cancelled. then the correct iframe is  
loaded, but only on the first run.

dror, if you are reading, please give this a look. I am using the  
basic parts you provided and 5.2… thanks.

Keith B.

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [September 8, 2006, 8:54pm UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/2 "2006-09-08T20:54:55Z")

</div>

Can you send me the error you get?

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [November 21, 2006, 10:05am UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/3 "2006-11-21T10:05:29Z")

</div>

Keith B. wrote:

> I don’t know if anyone else is using this, but dror’s multiple upload  
> type is exactly what I need for a client’s site that should have been  
> done on Monday. Except I can’t make it work. The initial upload goes  
> great, I just upload over 70 pictures into one gallery. i even got it  
> to spit our xml fo rsome flash stuff.
> 
> So far so good. But if I add images, it gives me an error. I have  
> fought with this all week, and gotten nowhere. The part page, for  
> some reason creates a second part, with no name and then I cannot  
> save. Once I upload a gallery, I cannot save ANYTHING in that page  
> again, because of this part. I have tracked it down to a mysterious  
> second iframe which gets cancelled. then the correct iframe is  
> loaded, but only on the first run.
> 
> dror, if you are reading, please give this a look. I am using the  
> basic parts you provided and 5.2… thanks.
> 
> Keith B.

Does anyone have the code Dror published for this upload. I’ve tried to  
build my own file upload but find that trying to graft anything into  
Radiant is a pain in the backside. Any help would be great. Thanks

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [November 21, 2006, 11:04am UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/4 "2006-11-21T11:04:13Z")

</div>

I have the code somewhere, but I ended up not using it. I never did  
get it to work correctly.

As for file uploads, do check out the new Mental (development) branch  
in SVN. Using extensions and acts\_as\_attachment, I got something very  
workable up and running. And added things to Radiant is MUCH easier  
than before. Be warned, this is very much in flux, but the direction  
it is going is very interesting.

I have an SVN repository with a simple upload manager, but Textdrive  
is not allowing anonymous access to it for some reason. I will try to  
get that sorted out and post a link today or tomorrow.

Keith B.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [November 21, 2006, 12:26pm UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/5 "2006-11-21T12:26:09Z")

</div>

Thanks keith. Need to try and get my head around Radiant more to fully  
understand it. Being new \>6 months to ruby its also a challenge!

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [November 21, 2006, 11:38am UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/6 "2006-11-21T11:38:24Z")

</div>

John asked if I would make this public last week, so here it is. It  
is very rough, basically just an assets manager built around  
acts\_as\_attachment. I did include the RMagick thumbnail generation,  
though this will kill your application on Textdrive. RMagick simply  
uses too much memory. I want to look at shifting this over to  
MiniMagick, but haven’t gotten around to it.

I have included some very basic Radius tags for the uploads. Right  
now, I have a wrap tag, \<r:asset \>\</r:asset\>, which takes a Name or  
Id of the asset. Please look under lib/assets\_tags.rb and see what is  
available. They should be (mostly) commented.

I had some support for tagging the assets, but I took it our for now.  
I need to get tagging support in general worked out before I put that  
back in, but ultimately, I would like to be able to do something like  
\<r:assets:each tag=“[tag\_name”]\>…\</r:asssets:each\>. Shouldn’t be  
too hard.

Feedback, suggestions and help greatly appreciated. Like I said, this  
is just a very simple start.

[http://www.keithbingman.com/svn/projects/radiant/extensions/assets](http://www.keithbingman.com/svn/projects/radiant/extensions/assets)

Keith B.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [November 21, 2006, 12:38pm UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/7 "2006-11-21T12:38:41Z")

</div>

In order for this to work, you need the latest Mental branch, not the  
current release (0.5.2). Once you have run your migrations, (the  
database has changed) you need to place this extension(the root  
folder “assets”) in the extensions folder. Then run “rake  
db:migrate:extensions”, which will set up the database tables for the  
assets.

Once you have the mental branch working, there is a new menu item,  
“Extensions”. This should show the assets extension and a new tab  
should show up, called Images or Assets (I changed it and don’t  
remember what I left it as…).

I completely forgot, this currently requires the acts\_as\_attachement  
plugin: [http://weblog.techno-weenie.net/articles/acts\_as\_attachment](http://weblog.techno-weenie.net/articles/acts_as_attachment)  
You will need to install that before it will work.

I realize this is all very complicated, as I write this. Please feel  
free to ask for help!

Keith B.  
removed\_email\_address@domain.invalid  
Tel: +49-7731-7983830

---

<div class="post-metadata">

**Author:** ![islepilot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ac8455/32.png) [@islepilot](https://www.ruby-forum.com/u/islepilot)\
**Post date:** [November 21, 2006, 12:28pm UTC](https://www.ruby-forum.com/t/page-part-types-multiple-uploads/68058/8 "2006-11-21T12:28:36Z")

</div>

One more thing, how would I graft this into an existing Radiant  
installation? Does it have to be broken up and the files placed in thier  
respective folders, or does it live in a directory somewhere. Thanks
