Commit 53889603 by liyijie

use send_file instead of url

parent 9a8b6530
......@@ -53,8 +53,8 @@ class SimpleController::BaseController < ::InheritedResources::Base
end
def export
url = exportable_class.export_xlsx collection, **params.to_unsafe_h.symbolize_keys
render json: { url: url }, status: 201
path = exportable_class.export_xlsx collection, **params.to_unsafe_h.symbolize_keys
send_file path
end
def batch_destroy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment