Description:
fix pdf to use inline display of browsers
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r519:ed40d9ca262b - - 2 files changed: 2 inserted, 1 deleted
@@ -57,13 +57,13 | |||
|
57 | 57 | if params[:ext]=='pdf' |
|
58 | 58 | content_type = 'application/pdf' |
|
59 | 59 | else |
|
60 | 60 | content_type = 'application/octet-stream' |
|
61 | 61 | end |
|
62 | 62 | |
|
63 | - send_file filename, :stream => false, :filename => base_filename, :type => content_type | |
|
63 | + send_file filename, :stream => false, :disposition => 'inline', :filename => base_filename, :type => content_type | |
|
64 | 64 | end |
|
65 | 65 | end |
|
66 | 66 | |
|
67 | 67 | def check_viewability |
|
68 | 68 | @user = User.find(session[:user_id]) |
|
69 | 69 | if @user==nil or !GraderConfiguration.show_tasks_to?(@user) |
You need to be logged in to leave comments.
Login now