Class: Formily::FileController

Inherits:
FormilyController show all
Defined in:
app/controllers/formily/file_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



11
12
13
14
15
# File 'app/controllers/formily/file_controller.rb', line 11

def destroy
  file = Formily::File.find(params[:id])
  file.destroy
  render nothing: true, status: :ok
end

#showObject



6
7
8
9
# File 'app/controllers/formily/file_controller.rb', line 6

def show
  f = Formily::File.find(params[:id])
  send_file Rails.root.join(f.file.path), type: f.file_content_type, disposition: 'inline'
end