def signed_url(url, filename = nil)
passphrase_secret = 'passphrase_secret'
delay = 120
timeout = (Time.now.to_i + delay)
file_path = URI::parse(url).path
download_params = "filename=#{URI::encode(filename)}&disposition=attachment&" if filename
params = "#{file_path}?#{download_params}ttl=#{timeout.to_s}"
signature = Digest::MD5.hexdigest("#{params}&passphrase=#{passphrase_secret}")