Sha256: c205662807a3dbcd6144ee37c5ade6e8eaf31d42f574311b5952d5951582a332

Contents?: true

Size: 483 Bytes

Versions: 23

Compression:

Stored size: 483 Bytes

Contents

class PostAttachmentsController < ForumBaseController

  # this simple controller is only here to restrict access to post attachments
  # if the forum is private, and to allow other extensions to add further restrictions
  
  def show
    @attachment = PostAttachment.find(params[:id])
    size = params[:size] || 'original'
    expires_in 1.week, :public => true, :private => false
    send_file @attachment.file.path(size.to_sym), :type => @attachment.file_content_type
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
radiant-forum-extension-3.0.7 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.6 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.5 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.4 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.3 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.2 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.1 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.0 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.0.rc6 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.0.rc4 app/controllers/post_attachments_controller.rb
radiant-forum-extension-3.0.0.rc3 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.1.6 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.1.4 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.1.3 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.1.2 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.1.1 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.0.9 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.0.8 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.0.7 app/controllers/post_attachments_controller.rb
radiant-forum-extension-2.0.6 app/controllers/post_attachments_controller.rb