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

Function shouldInterceptUploadFiles

index.tsx:51–60  ·  view source on GitHub ↗
(files: readonly File[], guildId: string | null)

Source from the content-addressed store, hash-verified

49}
50
51function shouldInterceptUploadFiles(files: readonly File[], guildId: string | null): boolean {
52 if (!settings.store.bypassDiscordUploadOnlyOverLimit) return true;
53
54 try {
55 return Boolean(discordFilesExceedLimit(files, guildId));
56 } catch {
57 const fallbackLimit = getUserMaxFileSize(UserStore.getCurrentUser());
58 return files.some(file => file.size > Math.max(0, fallbackLimit));
59 }
60}
61function extractFilesFromValue(value: unknown): File[] {
62 if (value instanceof File) return [value];
63

Callers 3

interceptUploadAddFilesFunction · 0.85
handlePasteFunction · 0.85
handleFileDropFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected