mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Special characters caused error [fixes SCI-315].
This commit is contained in:
parent
c87ba5b45c
commit
854ef0d227
2 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ class AssetsController < ApplicationController
|
|||
elsif @asset.file.is_stored_on_s3?
|
||||
redirect_to @asset.presigned_url, status: 307
|
||||
else
|
||||
send_file @asset.file.path, filename: @asset.file_file_name,
|
||||
send_file @asset.file.path, filename: URI.unescape(@asset.file_file_name),
|
||||
type: @asset.file_content_type
|
||||
end
|
||||
end
|
||||
|
|
|
@ -241,7 +241,7 @@ class Asset < ActiveRecord::Base
|
|||
key: file.path[1..-1],
|
||||
expires_in: 30,
|
||||
# this response header forces object download
|
||||
response_content_disposition: 'attachment; filename=' + file_file_name)
|
||||
response_content_disposition: 'attachment; filename=' + URI.escape(file_file_name))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue