From c4be602bbcd0d13ed408c90a2e52eb80bda66414 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 17 Jan 2020 18:08:39 +0800 Subject: [PATCH] Update upload.js --- app/admin/view/api/upload.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/admin/view/api/upload.js b/app/admin/view/api/upload.js index 8d5d6711c..a4856f7a1 100644 --- a/app/admin/view/api/upload.js +++ b/app/admin/view/api/upload.js @@ -94,16 +94,13 @@ define(['md5'], function (SparkMD5, allowExtsMimes) { /*! 读取文件并计算 HASH 值 */ var spark = new SparkMD5.ArrayBuffer(); var slice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice; - file.chunk_idx = 0, file.chunk_size = 2097152; - file.chunk_total = Math.ceil(this.size / this.chunk_size); + file.chunk_idx = 0, file.chunk_size = 2097152, file.chunk_total = Math.ceil(this.size / this.chunk_size); return jQuery.when(loadNextChunk(file)); function setFileXdata(file, xmd5) { file.xmd5 = xmd5; file.xkey = file.xmd5.substr(0, 2) + '/' + file.xmd5.substr(2, 30) + '.' + file.xext; - delete file.chunk_idx; - delete file.chunk_size; - delete file.chunk_total; + delete file.chunk_idx, delete file.chunk_size, delete file.chunk_total; return file; }