mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
20 lines
477 B
Ruby
20 lines
477 B
Ruby
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
class SystemAssetsController < ApplicationController
|
|
def show
|
|
backend = Service::SystemAssets.backend params[:identifier]
|
|
|
|
raise ActiveRecord::RecordNotFound if !backend
|
|
|
|
asset = backend.sendable_asset
|
|
|
|
send_data(
|
|
asset.content,
|
|
filename: asset.filename,
|
|
type: asset.type,
|
|
disposition: 'inline'
|
|
)
|
|
|
|
expires_in 1.year, public: true
|
|
end
|
|
end
|