Sha256: 896f7a94878434011221a861206919b7c3a32a68a330207b869ff589431f0f22
Contents?: true
Size: 681 Bytes
Versions: 1
Compression:
Stored size: 681 Bytes
Contents
# frozen_string_literal: true class PickedFile < SatelliteAsset sunrise_uploader PickedFileUploader validates_filesize_of :data, maximum: 50.megabytes.to_i def thumb_url; end def delete nil end def remote_token data.try(:file).try(:public_token) end def as_json(options = nil) options = { root: false, only: [:id, :guid, :assetable_id, :assetable_type, :user_id, :public_token], methods: [:filename, :url, :thumb_url, :size, :content_type, :remote_token] }.merge(options || {}) super(options) end def to_fileupload as_json end def remoteupload_klass TranslationCms::Api::Materials::Attachment end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
translation_cms-0.1.5 | app/models/media/picked_file.rb |