diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 12:24:52 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 12:24:52 +0200 |
| commit | 932d4a4be40587fa6d489eca16a1ef6d6f2936d1 (patch) | |
| tree | a7512889db54347845ce8f72e5a2155d917b4500 /app/controllers/assets_controller.rb | |
| parent | 6ef98ad444631b1d5ba67bb16aaaa2afdfa53ae0 (diff) | |
Witness asset uploads and out-of-band attaches in the action log
Diffstat (limited to 'app/controllers/assets_controller.rb')
| -rw-r--r-- | app/controllers/assets_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb index 8df4c94d..7edd9c05 100644 --- a/app/controllers/assets_controller.rb +++ b/app/controllers/assets_controller.rb | |||
| @@ -50,6 +50,11 @@ class AssetsController < ApplicationController | |||
| 50 | respond_to do |format| | 50 | respond_to do |format| |
| 51 | if @asset.save | 51 | if @asset.save |
| 52 | flash[:notice] = 'Asset was successfully created.' | 52 | flash[:notice] = 'Asset was successfully created.' |
| 53 | NodeAction.record!(:participants => [@asset], :user => current_user, | ||
| 54 | :action => "asset_create", | ||
| 55 | :asset_name => @asset.name, | ||
| 56 | :content_type => @asset.upload_content_type, | ||
| 57 | :path => @asset.upload.url.sub(/\?\d+$/, "")) | ||
| 53 | attach_to(attach_node) if attach_node | 58 | attach_to(attach_node) if attach_node |
| 54 | format.html { redirect_to(@asset) } | 59 | format.html { redirect_to(@asset) } |
| 55 | format.xml { render :xml => @asset, :status => :created, :location => @asset } | 60 | format.xml { render :xml => @asset, :status => :created, :location => @asset } |
