summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/renders_blob.rb
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2017-06-17 02:29:40 -0400
committerJacob Schatz <jschatz1@gmail.com>2017-06-17 02:29:40 -0400
commit232f282b41aa55b2394536c40dfe8d93ebf0abef (patch)
treeba7bfd443ecdc57d9fc6c3667c324abb9688e1eb /app/controllers/concerns/renders_blob.rb
parentbf405af4250f79bcf305b34f67a3426eb87ee7ff (diff)
parent4b962efc010c716139112b07417512fb2a930c25 (diff)
downloadgitlab-ce-232f282b41aa55b2394536c40dfe8d93ebf0abef.tar.gz
Merge branch 'dm-tree-json' into ide
Diffstat (limited to 'app/controllers/concerns/renders_blob.rb')
-rw-r--r--app/controllers/concerns/renders_blob.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/concerns/renders_blob.rb b/app/controllers/concerns/renders_blob.rb
index 54dcd7c61ce..0fd5399af9d 100644
--- a/app/controllers/concerns/renders_blob.rb
+++ b/app/controllers/concerns/renders_blob.rb
@@ -14,7 +14,11 @@ module RendersBlob
return render_404 unless viewer
render json: {
- html: view_to_html_string("projects/blob/_viewer", viewer: viewer, load_async: false)
+ html: view_to_html_string("projects/blob/_viewer", viewer: viewer, load_async: false),
+ plain: blob.data,
+ name: blob.name,
+ size: blob.size,
+ mime_type: blob.mime_type
}
end