Update upload.js

This commit is contained in:
Anyon 2020-01-17 18:08:39 +08:00
parent afbc28a1b5
commit c4be602bbc

View File

@ -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;
}