Class: FeedbackEngine::ScreenshotsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/feedback_engine/screenshots_controller.rb

Overview

Serves screenshots to the dashboard under its own authorization, streaming the blob instead of linking Active Storage's public blob URLs. Feedback screenshots can contain anything a user's screen showed, so they must never be reachable without passing the same gate as the dashboard — regardless of how the host app configures (or doesn't configure) blob access.

Instance Method Summary collapse

Instance Method Details

#showObject



12
13
14
15
16
17
18
19
# File 'app/controllers/feedback_engine/screenshots_controller.rb', line 12

def show
  screenshot = Feedback.find(params[:feedback_id]).screenshots.find(params[:id])

  send_data screenshot.download,
            filename: screenshot.filename.to_s,
            type: screenshot.content_type,
            disposition: 'inline'
end