上传图片

This commit is contained in:
zhangxuelin 2025-01-10 14:16:18 +08:00
parent de0a167cf5
commit a5be937eb3
1 changed files with 7 additions and 5 deletions

View File

@ -48,6 +48,7 @@ const init = () => {
if(res.rows && res.rows.length){
//
list.value = res.rows.filter( item => suffixAry.indexOf(getFileSuffix(item.fileShowName)) != -1)
console.log(list.value)
}
})
}
@ -64,12 +65,13 @@ const fileUrl = computed(() => (item) =>{
//
const onInsert = async (item) =>{
loading.value = true
const res = await fetch(item.fileFullPath)
const bolb = await res.blob()
const file = commUtils.blobToFile(bolb, item.fileShowName)
console.log('item', item)
// const res = await fetch(item.fileFullPath)
// const bolb = await res.blob()
// const file = commUtils.blobToFile(bolb, item.fileShowName)
const data=item.fileFullPath
try {
const data = await PPTApi.toRousrceUrl(file)
// const data = await PPTApi.toRousrceUrl(file)
if(videoSuffix.indexOf(getFileSuffix(item.fileShowName)) != -1){
emit('insertMaterial',{ type: 'video', data })
}