Browse Source

update file upload url

reghao 2 years ago
parent
commit
9e5c77ebd2
2 changed files with 2 additions and 1 deletions
  1. 1 1
      src/components/upload/PublishVideo.vue
  2. 1 0
      src/views/disk/UploadFile.vue

+ 1 - 1
src/components/upload/PublishVideo.vue

@@ -339,7 +339,7 @@ export default {
           const formData = new FormData()
           formData.append('file', coverFile)
           formData.append('channelId', this.imgData.channelId)
-          fetch(process.env.VUE_APP_OSS_URL, {
+          fetch(this.imgOssUrl, {
             headers: this.imgHeaders,
             method: 'POST',
             credentials: 'include',

+ 1 - 0
src/views/disk/UploadFile.vue

@@ -95,6 +95,7 @@ export default {
     getServerInfo(this.channelId).then(resp => {
       if (resp.code === 0) {
         const resData = resp.data
+        this.ossUrl = resData.ossUrl
         this.options = {
           target: resData.ossUrl,
           chunkSize: resData.maxSize,