From fa611ff2eeaac289931eb0e21a962743fb271ba7 Mon Sep 17 00:00:00 2001
From: sean.zhou <sean.zhou@dji.com>
Date: Fri, 23 Sep 2022 17:46:57 +0800
Subject: [PATCH] Update v1.2.0
---
src/components/MediaPanel.vue | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/components/MediaPanel.vue b/src/components/MediaPanel.vue
index 32b7714..0d1dedd 100644
--- a/src/components/MediaPanel.vue
+++ b/src/components/MediaPanel.vue
@@ -32,7 +32,7 @@
import { downloadFile } from '../utils/common'
import { downloadMediaFile, getMediaFiles } from '/@/api/media'
import { DownloadOutlined } from '@ant-design/icons-vue'
-import { Pagination } from 'ant-design-vue'
+import { message, Pagination } from 'ant-design-vue'
import { load } from '@amap/amap-jsapi-loader'
const workspaceId = localStorage.getItem(ELocalStorageKey.WorkspaceId)!
@@ -101,6 +101,7 @@
file_name: string,
file_path: string,
create_time: string,
+ file_id: string,
}
const mediaData = reactive({
@@ -128,12 +129,11 @@
function downloadMedia (media: MediaFile) {
loading.value = true
- downloadMediaFile(workspaceId, media.fingerprint).then(res => {
- if (res.code && res.code !== 0) {
+ downloadMediaFile(workspaceId, media.file_id).then(res => {
+ if (!res) {
return
}
- const suffix = media.file_name.substring(media.file_name.lastIndexOf('.'))
- const data = new Blob([res.data], { type: suffix === '.mp4' ? 'video/mp4' : 'image/jpeg' })
+ const data = new Blob([res])
downloadFile(data, media.file_name)
}).finally(() => {
loading.value = false
--
Gitblit v1.9.3