diff options
author | Denys Mishunov <dmishunov@gitlab.com> | 2019-07-03 11:19:32 +0300 |
---|---|---|
committer | Denys Mishunov <dmishunov@gitlab.com> | 2019-07-05 13:21:01 +0300 |
commit | 4c954a5c9e54e768aaca0eb787d8d9d2f63ebcae (patch) | |
tree | af2591796c0198ae29f21e9df4e73ccc21be3853 /app | |
parent | de6c2f7033e7d856be092e3bca4cfe7a33141733 (diff) |
Mark images as binary on init
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/ide/lib/files.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/content_viewer/lib/viewer_utils.js | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/lib/files.js b/app/assets/javascripts/ide/lib/files.js index b8abaa41f23..51278640b5b 100644 --- a/app/assets/javascripts/ide/lib/files.js +++ b/app/assets/javascripts/ide/lib/files.js @@ -77,6 +77,7 @@ export const decorateFiles = ({ const fileFolder = parent && insertParent(parent); if (name) { + const previewMode = viewerInformationForPath(name); parentPath = fileFolder && fileFolder.path; file = decorateData({ @@ -92,9 +93,9 @@ export const decorateFiles = ({ changed: tempFile, content, base64, - binary, + binary: (previewMode && previewMode.binary) || binary, rawPath, - previewMode: viewerInformationForPath(name), + previewMode, parentPath, }); diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/lib/viewer_utils.js b/app/assets/javascripts/vue_shared/components/content_viewer/lib/viewer_utils.js index ba63683f5c0..da0b45110e2 100644 --- a/app/assets/javascripts/vue_shared/components/content_viewer/lib/viewer_utils.js +++ b/app/assets/javascripts/vue_shared/components/content_viewer/lib/viewer_utils.js @@ -3,6 +3,7 @@ import { __ } from '~/locale'; const viewers = { image: { id: 'image', + binary: true, }, markdown: { id: 'markdown', |