Sha256: c2931c7302367c2460ce83dc58cf16dcd95a942399c0cd71856b704595c436df
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
class PostAttachmentsController < ForumBaseController # this simple controller exists for two reasons: to use sendfile for attachments (but it doesn't, yet) # and to allow other extensions (ie group_forum) to restrict access to post attachments def show @attachment = PostAttachment.find(params[:id]) size = params[:size] || 'original' expires_in SiteController.cache_timeout, :public => true, :private => false send_file @attachment.file.path(size.to_sym), :type => @attachment.file_content_type, :disposition => 'inline' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radiant-forum-extension-2.0.2 | app/controllers/post_attachments_controller.rb |