Release v2.1.65: safe MCP updates and measured upload scheduling
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-16 05:36:42 +02:00
1 parent e3c03d195e
commit 1ff552fc40
26 files changed
+552 -92

No files matched your search

+3 -3
View File
@@ -1,4 +1,5 @@
const fs = require('fs');
const { statUploadFile, readUploadFile } = require('./upload-file-io');
const path = require('path');
const crypto = require('crypto');
const { request, Agent } = require('undici');
@@ -67,7 +68,7 @@ class ClouddropUploader {
if (!this.apiKey) throw new Error('Clouddrop: API-Key fehlt');
const fileName = path.basename(filePath);
let fileSize = 0;
try { fileSize = fs.statSync(filePath).size; }
try { fileSize = (await statUploadFile(filePath)).size; }
catch { throw new Error(`Clouddrop: Datei nicht lesbar: ${fileName}`); }
if (fileSize <= 0) throw new Error('Clouddrop: Datei ist leer');
@@ -105,8 +106,7 @@ class ClouddropUploader {
let bytesRead = 0;
async function* generate() {
yield preambleBuf;
const fileStream = fs.createReadStream(filePath, { highWaterMark: 1024 * 1024 });
for await (const chunk of fileStream) {
for await (const chunk of readUploadFile(filePath, signal)) {
if (signal && signal.aborted) throw new Error('Aborted');
if (throttle) await throttle.consume(chunk.length, signal);
bytesRead += chunk.length;