Class: S3DirectMultipartUpload::Dev::StorageController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- S3DirectMultipartUpload::Dev::StorageController
- Defined in:
- app/controllers/s3_direct_multipart_upload/dev/storage_controller.rb
Instance Method Summary collapse
Instance Method Details
#upload ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/s3_direct_multipart_upload/dev/storage_controller.rb', line 12 def upload body = request.raw_post path = storage_path FileUtils.mkdir_p(path.dirname) File.binwrite(path, body) response.headers["ETag"] = %("#{Digest::MD5.hexdigest(body)}") head :ok end |