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

Function normalizePrimaryService

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

Source from the content-addressed store, hash-verified

1238}
1239
1240function normalizePrimaryService(primary: ServiceType, fileName: string): ServiceType {
1241 if (canServiceHandleFile(primary, fileName)) {
1242 return primary;
1243 }
1244
1245 if (isExeFileName(fileName)) {
1246 return ServiceType.GOFILE;
1247 }
1248
1249 if (!Native && primary === ServiceType.ZEROX0) {
1250 return ServiceType.CATBOX;
1251 }
1252
1253 return primary;
1254}
1255
1256function buildUploadOrder(primary: ServiceType, fileName: string): ServiceType[] {
1257 const disableFallbacks = Boolean((settings.store as { disableFallbacks?: boolean; }).disableFallbacks);

Callers 1

buildUploadOrderFunction · 0.85

Calls 2

canServiceHandleFileFunction · 0.85
isExeFileNameFunction · 0.85

Tested by

no test coverage detected