feat: update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
site_id: aklive2d
|
||||
total_size: 26214400 # 1024 * 1024 * 25
|
||||
akassets:
|
||||
project_name: akassets
|
||||
url: https://akassets.pages.dev
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user