Forum: Typo Integrating Paperclip

Posted by Gabriel Williams (standingwave)
on 2010-09-14 00:24
I just started using Typo and have it installed on Heroku.  Heroku
doesn't allow files to be written to disk (at least not permanently) so
I'm thinking of using Paperclip to handle file uploads and persisting on
Amazon S3.  So I have a couple questions:

1. Has anyone else integrated Paperclip (or any other file upload plugin
that supports S3 like attachment-fu) with Typo before?

2. It looks like there are two separate components where Typo handles
uploading files, the filemanager stuff and the CKeditorController.  Is
that actually the case or is there something I'm missing?  I've just
started to dive into the code and dig around so I wouldn't be surprised
if I've overlooked something.

Thanks for any help or pointers.

Gabriel
Posted by Matijs van Zuijlen (mvz)
on 2010-09-14 07:59
(Received via mailing list)
On 09/14/2010 12:24 AM, Gabriel Williams wrote:
> I just started using Typo and have it installed on Heroku.  Heroku
> doesn't allow files to be written to disk (at least not permanently) so
> I'm thinking of using Paperclip to handle file uploads and persisting on
> Amazon S3.  So I have a couple questions:
>
> 1. Has anyone else integrated Paperclip (or any other file upload plugin
> that supports S3 like attachment-fu) with Typo before?

It seems someone else is working it, but it doesn't seem like he got 
very far yet:

   http://github.com/framallo/typo/commit/c72221a580e...

Maybe you can combine forces?

> 2. It looks like there are two separate components where Typo handles
> uploading files, the filemanager stuff and the CKeditorController.  Is
> that actually the case or is there something I'm missing?  I've just
> started to dive into the code and dig around so I wouldn't be surprised
> if I've overlooked something.

I must admit this is a part of the code I know very little about, but 
you will
definitely need to take into account 
Admin::BaseHelper#show_thumbnail_for_editor
and Admin::ResourcesHelper#show_thumbnail. And of course you'll have to 
rewrite
the Resource model, but that's kind of the point of integrating 
paperclip.

Let us know how you're doing.

Regards,
Posted by Gabriel Williams (standingwave)
on 2010-09-29 23:24
Thanks Mat.  I was hoping not to have to refactor quite so much of the 
existing code, but I think you're right that I'll have to overhaul all 
of the Resource model.  I'm going to dig into this over the next week or 
so.  If I get anywhere with it I'll report back.  I'm sure I can't be 
the only person who has this need.

Gabriel
Posted by de Villamil Frédéric (Guest)
on 2010-09-29 23:38
(Received via mailing list)
Le 29 sept. 2010 à 23:24, Gabriel Williams a écrit :

> Thanks Mat.  I was hoping not to have to refactor quite so much of the 
> existing code, but I think you're right that I'll have to overhaul all 
> of the Resource model.  I'm going to dig into this over the next week or 
> so.  If I get anywhere with it I'll report back.  I'm sure I can't be 
> the only person who has this need.
> 
> Gabriel


Hello Gabriel,

If you start working on a paperclip integration, please do it on the 
Rails 3 branch, as we're going to merge it to HEAD very soon.

Best,
Frédéric

--
Frédéric de Villamil
"What's mine is mine. What's yours is still unsetteled" – Go player 
proverb
frederic@de-villamil.com                        tel: +33 (0)6 62 19 1337
http://t37.net                       Typo : http://typosphere.org
Posted by Gabriel Williams (standingwave)
on 2010-09-30 08:16
Sorry Frédéric, the project I'm doing this for is running on 2.3.8 so 
that's what I'll be working with.  I wish that it was using Rails 3.  Of 
course, I'm assuming that the Rails 3 branch you're working on won't be 
backwards compatible with Rails 2.3.8 right?

Gabriel

de Villamil Frédéric wrote:
> Le 29 sept. 2010 � 23:24, Gabriel Williams a �crit :
> 
>> Thanks Mat.  I was hoping not to have to refactor quite so much of the 
>> existing code, but I think you're right that I'll have to overhaul all 
>> of the Resource model.  I'm going to dig into this over the next week or 
>> so.  If I get anywhere with it I'll report back.  I'm sure I can't be 
>> the only person who has this need.
>> 
>> Gabriel
> 
> 
> Hello Gabriel,
> 
> If you start working on a paperclip integration, please do it on the 
> Rails 3 branch, as we're going to merge it to HEAD very soon.
> 
> Best,
> Fr�d�ric
> 
> --
> Fr�d�ric de Villamil
> "What's mine is mine. What's yours is still unsetteled" � Go player 
> proverb
> frederic@de-villamil.com                        tel: +33 (0)6 62 19 1337
> http://t37.net                       Typo : http://typosphere.org
Posted by de Villamil Frédéric (Guest)
on 2010-09-30 10:15
(Received via mailing list)
Hello,

No, Rails 3 branch has nothing backward compatible with Rails 2.3.8 
branch. Well, if you push your work on github, maybe (and I hope) we'll 
be able to backport it.

Best regards

Le 30 sept. 2010 à 08:16, Gabriel Williams a écrit :

>>> Thanks Mat.  I was hoping not to have to refactor quite so much of the 
>> If you start working on a paperclip integration, please do it on the 
>> http://t37.net                       Typo : http://typosphere.org
> 
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Typo-list mailing list
> Typo-list@rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list

--
Frédéric de Villamil
"What's mine is mine. What's yours is still unsetteled" – Go player 
proverb
frederic@de-villamil.com                        tel: +33 (0)6 62 19 1337
http://t37.net                       Typo : http://typosphere.org
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.