def send_range_for_local_file
        _, range = request.headers['Range'].split('bytes=')
        from, to = range.split('-').map(&:to_i)
        to = local_file_size - 1 unless to
        length = to - from + 1
        response.headers['Content-Range'] = "bytes #{from}-#{to}/#{local_file_size}"
        response.headers['Content-Length'] = length.to_s
        self.status = 206
        prepare_local_file_headers
        # For derivatives stored on the local file system
        send_data IO.binread(file, length, from), local_derivative_download_options.merge(status: status)
      end
def send_range_for_local_file
        _, range = request.headers['Range'].split('bytes=')
        from, to = range.split('-').map(&:to_i)
        to = local_file_size - 1 unless to
        length = to - from + 1
        response.headers['Content-Range'] = "bytes #{from}-#{to}/#{local_file_size}"
        response.headers['Content-Length'] = length.to_s
        self.status = 206
        prepare_local_file_headers
        # For derivatives stored on the local file system
        send_data IO.binread(file, length, from), local_derivative_download_options.merge(status: status)
      end
render an HTTP Range response