提交 5e3f03bc 编写于 作者: D DCloud_LXH

fix: 修复 compressVideo压缩目录

上级 e48fcada
...@@ -24,11 +24,11 @@ export function chooseVideo ({ ...@@ -24,11 +24,11 @@ export function chooseVideo ({
const errorCallback = warpPlusErrorCallback(callbackId, 'chooseVideo', 'cancel') const errorCallback = warpPlusErrorCallback(callbackId, 'chooseVideo', 'cancel')
function successCallback (tempFilePath = '') { function successCallback (tempFilePath = '') {
const dst = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(tempFilePath)}` const filename = `${TEMP_PATH}/compressed/${Date.now()}_${getFileName(tempFilePath)}`
const compressVideo = compressed ? new Promise((resolve) => { const compressVideo = compressed ? new Promise((resolve) => {
plus.zip.compressVideo({ plus.zip.compressVideo({
src: tempFilePath, src: tempFilePath,
dst filename
}, ({ tempFilePath }) => { }, ({ tempFilePath }) => {
resolve(tempFilePath) resolve(tempFilePath)
}, () => { }, () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册