diff options
Diffstat (limited to 'app/assets/javascripts/ide/components/new_dropdown/upload.vue')
-rw-r--r-- | app/assets/javascripts/ide/components/new_dropdown/upload.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/components/new_dropdown/upload.vue b/app/assets/javascripts/ide/components/new_dropdown/upload.vue index 84ff05c9750..4a9a2a57acd 100644 --- a/app/assets/javascripts/ide/components/new_dropdown/upload.vue +++ b/app/assets/javascripts/ide/components/new_dropdown/upload.vue @@ -35,7 +35,7 @@ export default { name: `${this.path ? `${this.path}/` : ''}${name}`, type: 'blob', content, - rawPath: !isText ? target.result : '', + rawPath: !isText ? URL.createObjectURL(file) : '', }); if (isText) { @@ -44,7 +44,7 @@ export default { reader.addEventListener('load', e => emitCreateEvent(e.target.result), { once: true }); reader.readAsText(file); } else { - emitCreateEvent(encodedContent); + emitCreateEvent(rawContent); } }, readFile(file) { |