# frozen_string_literal: true class FreeQuoteFile < 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::Attachment end def self.fileupload_find_asset(params) find_by(remote_asset_id: params[:id]) end end