MCPcopy Create free account
hub / github.com/ScattrdBlade/bigFileUpload / uploadPreparedBlob

Function uploadPreparedBlob

utils/upload.ts:1513–1521  ·  view source on GitHub ↗
(blob: Blob, sourceUrl?: string, forceSend?: boolean)

Source from the content-addressed store, hash-verified

1511}
1512
1513async function uploadPreparedBlob(blob: Blob, sourceUrl?: string, forceSend?: boolean): Promise<string> {
1514 const primary = settings.store.serviceType as ServiceType;
1515 const { blob: normalizedBlob, filename, originalFilename } = await normalizeUploadBlob(blob, sourceUrl);
1516 setUploadState({ fileName: filename, status: "File ready, starting upload...", percent: 4 });
1517 const uploadedUrl = await uploadWithFallbacks(normalizedBlob, filename, primary);
1518 const finalUrl = applyEmbedProxy(finalizeUploadedUrl(uploadedUrl));
1519 await notifyUploadSuccess(finalUrl, forceSend, originalFilename || filename);
1520 return finalUrl;
1521}
1522
1523export async function uploadFile(url: string): Promise<void> {
1524 if (isUploading) {

Callers 2

uploadFileFunction · 0.85
uploadProvidedFilesFunction · 0.85

Calls 6

normalizeUploadBlobFunction · 0.85
setUploadStateFunction · 0.85
uploadWithFallbacksFunction · 0.85
applyEmbedProxyFunction · 0.85
finalizeUploadedUrlFunction · 0.85
notifyUploadSuccessFunction · 0.85

Tested by

no test coverage detected