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

Function buildUploadOrder

utils/upload.ts:1256–1272  ·  view source on GitHub ↗
(primary: ServiceType, fileName: string)

Source from the content-addressed store, hash-verified

1254}
1255
1256function buildUploadOrder(primary: ServiceType, fileName: string): ServiceType[] {
1257 const disableFallbacks = Boolean((settings.store as { disableFallbacks?: boolean; }).disableFallbacks);
1258 const effectivePrimary = normalizePrimaryService(primary, fileName);
1259
1260 const order: ServiceType[] = [effectivePrimary];
1261 if (disableFallbacks) {
1262 return order;
1263 }
1264
1265 for (const fallback of getFallbackServices()) {
1266 if (fallback !== effectivePrimary && canServiceHandleFile(fallback, fileName)) {
1267 order.push(fallback);
1268 }
1269 }
1270
1271 return order;
1272}
1273
1274function finalizeUploadedUrl(url: string): string {
1275 if (!settings.store.stripQueryParams) {

Callers 1

uploadWithFallbacksFunction · 0.85

Calls 3

normalizePrimaryServiceFunction · 0.85
getFallbackServicesFunction · 0.85
canServiceHandleFileFunction · 0.85

Tested by

no test coverage detected