On 20 Sep 2009, at 13:14, Greg Hauptmann wrote:
> What would be the best design if I wanted a RubyOnRails basic CMS that
> would allow HTML/images to be uploaded and viewed by users who were
> allowed to see them. In particular what would be a good / robust way
> to host the files? For example:
>
> a) Let Apache web server (i.e. not RoR engine) host them - this would
> require RoR could save the files out on the Unix/Linux box to an
> approach location under the web server (not sure how possible this
> is). Also it means that user management would need to be
> integrated/handled by Apache (could be an issue perhaps?)
>
> b) Let RoR application store them in it''s own directory area, but
not
> under the "/public" directory as this could be visible on web for
the
> right URL - once stored on file, then the image tag URL in the HTML
> pages would need to tell the RoR application to get them via a
> specific controller/action which would then have to retrieve them and
> stream them out...
>
> c) As per b) above but stored in a mysql database
I''d go for Apache with the mod X-Sendfile compiled into it.
There''s an
option in the latest Rails version afaik to use it out of the box and
in previous versions it''s just a matter of installing a plugin or
crafting the headers yourself. It basically comes down to handling
authentication etc with Rails and serving the file through Apache
directly using a special header.
http://www.google.com/search?client=safari&rls=en&q=rails+2.3+x+sendfile&ie=UTF-8&oe=UTF-8
Best regards
Peter De Berdt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---