Integrating Paperclip

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

On 09/14/2010 12:24 AM, Gabriel W. 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:

added paperclip plugin · framallo/typo@c72221a · GitHub

Maybe you can combine forces?

  1. 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,

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

Le 29 sept. 2010 à 23:24, Gabriel W. 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
[email protected] tel: +33 (0)6 62 19 1337
http://t37.net Typo : http://typosphere.org

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 W. 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
[email protected] tel: +33 (0)6 62 19 1337
http://t37.net Typo : http://typosphere.org

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 W. 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
[email protected]
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
[email protected] tel: +33 (0)6 62 19 1337
http://t37.net Typo : http://typosphere.org