From 152c4b07248d4aed4b734721bd634e546a89ef19 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 6 Jul 2017 15:38:01 +0200 Subject: Compute checksum and byte_size client side Then we can add integrity checks on uploads to prevent errors in transport. --- lib/active_storage/service/disk_service.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib/active_storage/service/disk_service.rb') diff --git a/lib/active_storage/service/disk_service.rb b/lib/active_storage/service/disk_service.rb index 7981226a1e..98e0f5eb7f 100644 --- a/lib/active_storage/service/disk_service.rb +++ b/lib/active_storage/service/disk_service.rb @@ -36,7 +36,6 @@ class ActiveStorage::Service::DiskService < ActiveStorage::Service File.exist? path_for(key) end - def url(key, expires_in:, disposition:, filename:) verified_key_with_expiration = ActiveStorage::VerifiedKeyWithExpiration.encode(key, expires_in: expires_in) @@ -47,15 +46,6 @@ class ActiveStorage::Service::DiskService < ActiveStorage::Service end end - def byte_size(key) - File.size path_for(key) - end - - def checksum(key) - Digest::MD5.file(path_for(key)).hexdigest - end - - private def path_for(key) File.join root, folder_for(key), key -- cgit v1.2.3