diff options
author | Denys Mishunov <dmishunov@gitlab.com> | 2019-04-17 22:51:17 +0200 |
---|---|---|
committer | Denys Mishunov <dmishunov@gitlab.com> | 2019-04-18 00:16:46 +0200 |
commit | 166c3ea296c4029e4536c193e5169fa613003186 (patch) | |
tree | 6a8b89eece6f0b6b4585bb3cb797c64d0e97137d /spec | |
parent | c8c8dd118a27b682c8c7a58d9bbea64c2c1ef445 (diff) | |
download | gitlab-ce-166c3ea296c4029e4536c193e5169fa613003186.tar.gz |
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 'spec')
-rw-r--r-- | spec/javascripts/ide/components/new_dropdown/upload_spec.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/javascripts/ide/components/new_dropdown/upload_spec.js b/spec/javascripts/ide/components/new_dropdown/upload_spec.js index 878e17ac805..d19af6af2d7 100644 --- a/spec/javascripts/ide/components/new_dropdown/upload_spec.js +++ b/spec/javascripts/ide/components/new_dropdown/upload_spec.js @@ -78,6 +78,8 @@ describe('new dropdown upload', () => { type: 'blob', content: 'plain text', base64: false, + binary: false, + rawPath: '', }); }); @@ -89,6 +91,8 @@ describe('new dropdown upload', () => { type: 'blob', content: binaryTarget.result.split('base64,')[1], base64: true, + binary: true, + rawPath: binaryTarget.result, }); }); }); |