1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-19 08:57:09 +03:00

🐛 Fix issue that binary data did not get displayed full height&width

This commit is contained in:
Jan Oberhauser 2022-01-22 11:02:27 +01:00
parent 8cefafa47d
commit b23a87c7f4

View File

@ -1,19 +1,19 @@
<template>
<div>
<span>
<div v-if="isLoading">
Loading binary data...
</div>
<div v-else-if="error">
Error loading binary data
</div>
<div v-else>
<span v-else>
<video v-if="binaryData.mimeType && binaryData.mimeType.startsWith('video/')" controls autoplay>
<source :src="embedSource" :type="binaryData.mimeType">
{{ $locale.baseText('binaryDataDisplay.yourBrowserDoesNotSupport') }}
</video>
<embed v-else :src="embedSource" class="binary-data" :class="embedClass"/>
</div>
</div>
<embed v-else :src="embedSource" class="binary-data" :class="embedClass()"/>
</span>
</span>
</template>
<script lang="ts">
@ -54,7 +54,7 @@ export default mixins(
}
},
methods: {
embedClass (): string[] {
embedClass(): string[] {
// @ts-ignore
if (this.binaryData! !== null && this.binaryData!.mimeType! !== undefined && (this.binaryData!.mimeType! as string).startsWith('image')) {
return ['image'];