Movatterモバイル変換


[0]ホーム

URL:


Skip to ContentSkip to Search
Ruby on Rails 8.1.1

Class ActiveStorage::Blobs::ProxyController<ActiveStorage::BaseController

v8.1.1

Proxy files through application. This avoids having a redirect and makes files easier to cache.

WARNING: All Active Storage controllers are publicly accessible by default. The generated URLs are hard to guess, but permanent by design. If your files require a higher level of protection consider implementingAuthenticated Controllers.

Methods
S
Included Modules

Instance Public methods

show()Link

Source:show |on GitHub

# File activestorage/app/controllers/active_storage/blobs/proxy_controller.rb, line 14defshowifrequest.headers["Range"].present?send_blob_byte_range_data@blob,request.headers["Range"]elsehttp_cache_foreverpublic:truedoresponse.headers["Accept-Ranges"] ="bytes"response.headers["Content-Length"] =@blob.byte_size.to_ssend_blob_stream@blob,disposition:params[:disposition]endendend

[8]ページ先頭

©2009-2025 Movatter.jp