module Shrine::Plugins::DownloadEndpoint::FileMethods

  1. lib/shrine/plugins/download_endpoint.rb

Methods

Public Instance

  1. url

Public Instance methods

url (**options)

Constructs the URL from the optional host, prefix, storage key and uploaded file's id. For other uploaded files that aren't in the list of storages it just returns their original URL.

[show source]
# File lib/shrine/plugins/download_endpoint.rb, line 105
def url(**options)
  if shrine_class.opts[:download_endpoint_storages].include?(storage_key.to_sym)
    download_url
  else
    super
  end
end