Class: ActiveStorageExt::AudiosController

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/active_storage_ext/audios_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
# File 'app/controllers/active_storage_ext/audios_controller.rb', line 7

def show
  expires_in ActiveStorage::Blob.service.url_expires_in
end

#transferObject



11
12
13
14
15
16
17
# File 'app/controllers/active_storage_ext/audios_controller.rb', line 11

def transfer
  attached = @attachment.transfer_faststart
  @video = attached.blob

  flash[:notice] = 'well done!'
  render 'show'
end