- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit - 删除重复的旧配额说明块,保留新的当前配额设置显示 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
517 B
JavaScript
22 lines
517 B
JavaScript
import { AwsCrc32 } from "@aws-crypto/crc32";
|
|
import { numToUint8 } from "@aws-crypto/util";
|
|
import * as zlib from "zlib";
|
|
class NodeCrc32 {
|
|
checksum = 0;
|
|
update(data) {
|
|
this.checksum = zlib.crc32(data, this.checksum);
|
|
}
|
|
async digest() {
|
|
return numToUint8(this.checksum);
|
|
}
|
|
reset() {
|
|
this.checksum = 0;
|
|
}
|
|
}
|
|
export const getCrc32ChecksumAlgorithmFunction = () => {
|
|
if (typeof zlib.crc32 === "undefined") {
|
|
return AwsCrc32;
|
|
}
|
|
return NodeCrc32;
|
|
};
|