@samitouri / QOSami-HFS / commits / 72a9593b

fix: uploads without content-length were not working with min_available_mb=0

Massimo Melina committed Jul 24, 2026 at 11:38 UTC 72a9593b94bbb32297ff5726e0235105871d42e2
1 file changed +1 -1
src/upload.ts
+1 -1
@@ -135,7 +135,7 @@ export function uploadWriter(base: VfsNode, baseUri: string, filename: string, c
135 // append if resuming
136 if (!resume && stats)
137 fs.unlinkSync(tempName)
138 - const writeStream = createStreamLimiter(contentLength ?? Infinity)
138 + const writeStream = createStreamLimiter(isNaN(contentLength) ? Infinity : contentLength)
139 const fullSize = stillToWrite + resume
140 // allow plugins to mess with the write-stream, because the read-stream can be complicated in case of multipart
141 const obj = { ctx, writeStream, fullPath, tempName, resume, fullSize, uri: '' }