ソースを参照

上传视频修改为1G

yuhongqi 4 日 前
コミット
574106b0f4

+ 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>
@@ -164,7 +164,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();
@@ -192,7 +192,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");
       }
@@ -221,7 +221,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

@@ -43,7 +43,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>
@@ -271,7 +271,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();
@@ -299,7 +299,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");
       }
@@ -327,7 +327,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;