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

Function getFilenameExtension

utils/upload.ts:1307–1313  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

1305}
1306
1307function getFilenameExtension(filename: string): string | undefined {
1308 const dotIndex = filename.lastIndexOf(".");
1309 if (dotIndex < 1 || dotIndex === filename.length - 1) return undefined;
1310
1311 const ext = filename.slice(dotIndex + 1).toLowerCase();
1312 return ext.length <= 10 ? ext : undefined;
1313}
1314
1315async function notifyUploadSuccess(finalUrl: string, forceSend?: boolean, displayName?: string): Promise<void> {
1316 if (settings.store.autoCopy) {

Callers 1

normalizeUploadBlobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected