feat: update

This commit is contained in:
Haoyu Xu
2025-04-26 18:06:18 +08:00
parent 8865f16eee
commit b5c3361dd2
4 changed files with 268 additions and 155 deletions

View File

@@ -1,4 +1,5 @@
site_id: aklive2d
total_size: 26214400 # 1024 * 1024 * 25
akassets:
project_name: akassets
url: https://akassets.pages.dev

View File

@@ -138,14 +138,13 @@ const generateUploadDist = (item, depth = -1) => {
if (item.type === 'dir' && depth === 1) {
// shall zip dir
const children = flattenChildren(item)
const totalSize = 1024 * 1024 * 20
let count = 0,
filesToZip = [],
size = 0
const ret = {}
for (const child of children) {
const currentsize = fileLib.size(path.join(dataDir, child.path))
if (size + currentsize >= totalSize) {
if (size + currentsize >= config.total_size) {
createZipFile(
`${item.name}-${count}`,
[...filesToZip],