Skip to content

Commit 4824097

Browse files
author
Gogs
committed
Change filename on download
1 parent 3a93d1e commit 4824097

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/documents_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def show
5555

5656
# GET /documents/file/:id
5757
def download
58-
send_file Settings.document_folder + @document.document_url, :type=>"application/pdf", :x_sendfile=>true
58+
send_file Settings.document_folder + @document.document_url, :filename=>@document.title + ".pdf", :type=>"application/pdf", :x_sendfile=>true
5959
end
6060

6161
# PUT /documents/:id

0 commit comments

Comments
 (0)