Compare commits

..

No commits in common. "c6c59ce8685b3936a663fe3e707bb2bf8d6fd2c5" and "bc32f4dc9575598dfbb07388f5020200c325b072" have entirely different histories.

2 changed files with 4 additions and 16 deletions

View File

@ -78,22 +78,10 @@ class ClouddropUploader {
fileId = await this._uploadChunked(filePath, fileName, fileSize, progressCb, signal, throttle); fileId = await this._uploadChunked(filePath, fileName, fileSize, progressCb, signal, throttle);
} }
// Create a share link — retry a few times while server post-processes the file. // Create a share link for the uploaded file
// If share-link ultimately fails, DO NOT throw: upload itself succeeded and we const shareUrl = await this._createShareLink(fileId, signal);
// don't want upload-manager to retry the entire (possibly multi-GB) upload.
let shareUrl = null;
const shareAttempts = 6;
for (let i = 0; i < shareAttempts; i++) {
if (signal && signal.aborted) throw new Error('Aborted');
try {
shareUrl = await this._createShareLink(fileId, signal);
if (shareUrl) break;
} catch (err) {
if (i === shareAttempts - 1) break;
await new Promise(r => setTimeout(r, 3000 + i * 2000));
}
}
// Extract slug from share URL (format: https://clouddrop.cc/share/SLUG)
const slugMatch = String(shareUrl || '').match(/\/share\/([a-zA-Z0-9]+)/); const slugMatch = String(shareUrl || '').match(/\/share\/([a-zA-Z0-9]+)/);
const fileCode = slugMatch ? slugMatch[1] : fileId; const fileCode = slugMatch ? slugMatch[1] : fileId;

View File

@ -1,6 +1,6 @@
{ {
"name": "multi-hoster-uploader", "name": "multi-hoster-uploader",
"version": "2.7.3", "version": "2.7.2",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously", "description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {