Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Mishunov <dmishunov@gitlab.com>2019-04-17 23:51:17 +0300
committerDenys Mishunov <dmishunov@gitlab.com>2019-04-18 01:16:46 +0300
commit166c3ea296c4029e4536c193e5169fa613003186 (patch)
tree6a8b89eece6f0b6b4585bb3cb797c64d0e97137d /app/assets/javascripts/ide/lib
parentc8c8dd118a27b682c8c7a58d9bbea64c2c1ef445 (diff)
Stores 'binary' and 'rawPath' attr after upload
- When uploading a file, we need to flag binary files correspondingly so that it gets propagated all the way to RepoEditor as it decides on whether to show editor for this or that file or not (shouldHideEditor()) - rawPath needs to be propagate all the way to ContentViewer as well so that uploaded images could be rendered as a base64 image right away instead of raw base64 string
Diffstat (limited to 'app/assets/javascripts/ide/lib')
-rw-r--r--app/assets/javascripts/ide/lib/files.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/lib/files.js b/app/assets/javascripts/ide/lib/files.js
index df100f753d7..b8abaa41f23 100644
--- a/app/assets/javascripts/ide/lib/files.js
+++ b/app/assets/javascripts/ide/lib/files.js
@@ -22,6 +22,8 @@ export const decorateFiles = ({
tempFile = false,
content = '',
base64 = false,
+ binary = false,
+ rawPath = '',
}) => {
const treeList = [];
const entries = {};
@@ -90,6 +92,8 @@ export const decorateFiles = ({
changed: tempFile,
content,
base64,
+ binary,
+ rawPath,
previewMode: viewerInformationForPath(name),
parentPath,
});