提交 6a24d2d9 编写于 作者: Q qiang

fix(App): compressVideo filename

上级 d8a1cf62
......@@ -5903,12 +5903,12 @@ var serviceContext = (function (vue) {
}, CompressImageProtocol, CompressImageOptions);
const compressVideo = defineAsyncApi(API_COMPRESS_VIDEO, (options, { resolve, reject }) => {
const dst = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(options.src)}`;
const filename = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(options.src)}`;
plus.zip.compressVideo(extend({}, options, {
dst,
filename,
}), () => {
resolve({
tempFilePath: dst,
tempFilePath: filename,
});
}, reject);
}, CompressVideoProtocol, CompressVideoOptions);
......
......@@ -12,16 +12,16 @@ import {
export const compressVideo = defineAsyncApi<API_TYPE_COMPRESS_VIDEO>(
API_COMPRESS_VIDEO,
(options, { resolve, reject }) => {
const dst = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(
const filename = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(
options.src
)}`
plus.zip.compressVideo(
extend({}, options, {
dst,
filename,
}),
() => {
resolve({
tempFilePath: dst,
tempFilePath: filename,
})
},
reject
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册