Class: Strapi::Media
- Inherits:
-
ContentType
- Object
- ContentType
- Strapi::Media
- Defined in:
- lib/strapi/media.rb
Overview
The Content-Type for uploaded Strapi photos, videos, and files
Instance Attribute Summary
Attributes inherited from ContentType
Instance Method Summary collapse
Methods inherited from ContentType
#==, all, create, #delete, field, find, #initialize, plural_id, #save, where
Constructor Details
This class inherits a constructor from Strapi::ContentType
Instance Method Details
#url ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/strapi/media.rb', line 21 def url return unless (url_string = @attributes[:url].presence) if url_string.include?('//') url_string else ENV['STRAPI_HOST_URL'] + url_string end end |