Class: Hyrax::UploadsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::UploadsController
- Defined in:
- app/controllers/hyrax/uploads_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/hyrax/uploads_controller.rb', line 6 def create if params[:id].blank? @upload.attributes = { file: params[:files].first, user: current_user } else upload_with_chunking end @upload.save! end |
#destroy ⇒ Object
16 17 18 19 |
# File 'app/controllers/hyrax/uploads_controller.rb', line 16 def destroy @upload.destroy head :no_content end |