附件下载

dev_forum
cxt 5 years ago
parent 63a5dea9e1
commit a7ab2dde23

@ -14,7 +14,7 @@ class AttachmentsController < ApplicationController
update_downloads(@file)
redirect_to @file.cloud_url and return
end
send_file absolute_path(local_path(@file)), type: @file.content_type
send_file absolute_path(local_path(@file)), type: @file.content_type.presence || 'application/octet-stream'
update_downloads(@file)
end

Loading…
Cancel
Save