Skip to content
Snippets Groups Projects
Commit b664b784 authored by Saito's avatar Saito
Browse files

linguist and web browser will take care of mimetype and encoding problem.

parent 5b66e08a
No related branches found
No related tags found
1 merge request!1949Add a link to commit path on notes button (commit list)
Loading
Loading
@@ -11,16 +11,9 @@ class BlobController < ProjectResourceController
 
def show
if @tree.is_blob?
if @tree.text?
encoding = detect_encoding(@tree.data)
mime_type = encoding ? "text/plain; charset=#{encoding}" : "text/plain"
else
mime_type = @tree.mime_type
end
send_data(
@tree.data,
type: mime_type,
type: @tree.mime_type,
disposition: 'inline',
filename: @tree.name
)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment