浏览代码

上传视频修改为1G

yuhongqi 1 周之前
父节点
当前提交
1ba475d9f2
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 4 4
      src/components/LiveVideoUpload/index.vue
  2. 4 4
      src/components/VideoUpload/index.vue

+ 4 - 4
src/components/LiveVideoUpload/index.vue

@@ -40,7 +40,7 @@
 <!--              status="success">-->
 <!--            </el-progress>-->
 <!--          </div>-->
-          <div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过800M</div>
+          <div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过1G</div>
         </el-upload>
       </div>
     </el-form-item>
@@ -163,7 +163,7 @@ export default {
       // 重置其他状态...
     },
     handleChange(file, fileList) {
-      const MAX_SIZE = 800 * 1024 * 1024;
+      const MAX_SIZE = 1024 * 1024 * 1024;
       if (file.raw && file.raw.size > MAX_SIZE) {
         this.$message.error("文件大小不能超过800M");
         this.$refs.upload.clearFiles();
@@ -191,7 +191,7 @@ export default {
       if (this.fileList.length < 1) {
         return this.$message.error("请先选取视频,再进行上传");
       }
-      const MAX_SIZE = 800 * 1024 * 1024;
+      const MAX_SIZE = 1024 * 1024 * 1024;
       if (this.fileList[0].raw && this.fileList[0].raw.size > MAX_SIZE) {
         return this.$message.error("文件大小不能超过800M");
       }
@@ -212,7 +212,7 @@ export default {
     async uploadVideoToTxPcdn() {
       try {
         const file = this.fileList[0].raw;
-        const MAX_SIZE = 800 * 1024 * 1024;
+        const MAX_SIZE = 1024 * 1024 * 1024;
         if (file && file.size > MAX_SIZE) {
           this.$message.error("文件大小不能超过800M");
           return;

+ 4 - 4
src/components/VideoUpload/index.vue

@@ -44,7 +44,7 @@
 <!--              status="success">-->
 <!--            </el-progress>-->
 <!--          </div>-->
-          <div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过800M</div>
+          <div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过1G</div>
 <!--        </el-upload>-->
       </div>
     </el-form-item>
@@ -277,7 +277,7 @@ export default {
       this.getList();
     },
     handleChange(file, fileList) {
-      const MAX_SIZE = 800 * 1024 * 1024;
+      const MAX_SIZE = 1024 * 1024 * 1024;
       if (file.raw && file.raw.size > MAX_SIZE) {
         this.$message.error("文件大小不能超过800M");
         this.$refs.upload?.clearFiles();
@@ -305,7 +305,7 @@ export default {
       if (this.fileList.length < 1) {
         return this.$message.error("请先选取视频,再进行上传");
       }
-      const MAX_SIZE = 800 * 1024 * 1024;
+      const MAX_SIZE = 1024 * 1024 * 1024;
       if (this.fileList[0].raw && this.fileList[0].raw.size > MAX_SIZE) {
         return this.$message.error("文件大小不能超过800M");
       }
@@ -333,7 +333,7 @@ export default {
     async uploadVideoToTxPcdn() {
       try {
         const file = this.fileList[0].raw;
-        const MAX_SIZE = 800 * 1024 * 1024;
+        const MAX_SIZE = 1024 * 1024 * 1024;
         if (file && file.size > MAX_SIZE) {
           this.$message.error("文件大小不能超过800M");
           return;