Class | BinaryObjectController
In: | app/controllers/binary_object_controller.rb
Parent: | ApplicationController

添付ファイルをデータベースのテーブルに保存する。

### Methods

download

### Public Instance methods

download()

添付ファイルをダウンロードする。

[Source]

        # File app/controllers/binary_object_controller.rb, line 4
     4:   def download
     5:     begin
     6:       binary_object = BinaryObject.find(params[:id])
     7:     rescue ActiveRecord::RecordNotFound
     8:       raise NotFoundException, "binary object not found: #{params[:id]}"
     9:     end
    10:     send_data(binary_object.content, :type => binary_object.mime_type, :filename => binary_object.name)
    11:   end

[Validate]