|
@@ -487,10 +487,29 @@ export default {
|
|
|
};
|
|
|
|
|
|
pptx2.write('blob').then((data)=>{
|
|
|
+ // 1走后端接口上传
|
|
|
+ const uploadType=this.$setting.dynamicOutLinks.PptUpdateApi ||
|
|
|
+ this.$store.state.dynamicOutLinks.PptUpdateApi ||
|
|
|
+ JSON.parse(localStorage.getItem('dynamicOutLinks')).PptUpdateApi
|
|
|
+ if(uploadType==1){
|
|
|
+ let form = new FormData()
|
|
|
+ form.append("file",data)
|
|
|
+ form.append("PptId",this.$route.query.id)
|
|
|
+ pptInterface.uploadPPTXFile(form).then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.publishPPT(res.Data.ResourceUrl)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 上传到阿里云oss
|
|
|
+ // this.handleUploadToOSS(data)
|
|
|
let clientType = this.$setting.dynamicOutLinks.ObjectStorageClient ||
|
|
|
this.$store.state.dynamicOutLinks.ObjectStorageClient ||
|
|
|
JSON.parse(localStorage.getItem('dynamicOutLinks')).ObjectStorageClient
|
|
|
- // 上传到 对象存储器 阿里云、mino
|
|
|
+ // 上传到 对象存储器
|
|
|
uploadFileDirect(clientType,data,temName,options).then(url=>{
|
|
|
console.log('文件地址',url);
|
|
|
this.publishPPT(url)
|