diff options
author | George Claghorn <george@basecamp.com> | 2018-07-15 19:58:14 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-07-15 19:58:14 -0400 |
commit | 390097531bd17369f05a23eba58c37b850ac95dd (patch) | |
tree | b2dfaf535680ae6ff94c6fb7ed441b1d348e397a /activestorage/lib | |
parent | 5a71a773eab626319d30f35402b9595a26bfe64e (diff) | |
download | rails-390097531bd17369f05a23eba58c37b850ac95dd.tar.gz rails-390097531bd17369f05a23eba58c37b850ac95dd.tar.bz2 rails-390097531bd17369f05a23eba58c37b850ac95dd.zip |
Support HTTP Range downloads from disk
Closes #32193.
Diffstat (limited to 'activestorage/lib')
-rw-r--r-- | activestorage/lib/active_storage/service/disk_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activestorage/lib/active_storage/service/disk_service.rb b/activestorage/lib/active_storage/service/disk_service.rb index b1b6f1ddcf..9f304b7e01 100644 --- a/activestorage/lib/active_storage/service/disk_service.rb +++ b/activestorage/lib/active_storage/service/disk_service.rb @@ -117,11 +117,11 @@ module ActiveStorage { "Content-Type" => content_type } end - private - def path_for(key) - File.join root, folder_for(key), key - end + def path_for(key) #:nodoc: + File.join root, folder_for(key), key + end + private def folder_for(key) [ key[0..1], key[2..3] ].join("/") end |