( file: Pick<UserFile, 'size'>, providerId: ProviderId | string )
| 86 | |
| 87 | /** True when a file exceeds the inline threshold and the provider has a large-file path. */ |
| 88 | export function shouldUseLargeFilePath( |
| 89 | file: Pick<UserFile, 'size'>, |
| 90 | providerId: ProviderId | string |
| 91 | ): boolean { |
| 92 | if (getProviderFileAttachment(providerId).strategy === 'inline') return false |
| 93 | return Number.isFinite(file.size) && file.size > INLINE_ATTACHMENT_THRESHOLD_BYTES |
| 94 | } |
| 95 | |
| 96 | const PDF_MIME_TYPE = 'application/pdf' |
| 97 |
no test coverage detected