Sha256: 55af00569558ef7f6dd86888a9b68074d2e844a5a0aecf62e243f1547b1d7b21
Contents?: true
Size: 712 Bytes
Versions: 15
Compression:
Stored size: 712 Bytes
Contents
module Pageflow class AudioFile < ApplicationRecord include HostedFile include EncodedFileStateMachine belongs_to :confirmed_by, class_name: 'User', optional: true def attachment_s3_url "s3://#{File.join(attachment.bucket_name, attachment.path)}" end def m4a ZencoderAttachment.new(self, "audio.m4a") end def mp3 ZencoderAttachment.new(self, "audio.mp3") end def ogg ZencoderAttachment.new(self, "audio.ogg") end def output_definition ZencoderAudioOutputDefinition.new(self) end def meta_data_attributes=(attributes) self.attributes = attributes.symbolize_keys.slice(:format, :duration_in_ms) end end end
Version data entries
15 entries across 15 versions & 1 rubygems