A downloadable file with a supported extension, regardless of size.
(entry: DropboxFileEntry)
| 64 | |
| 65 | /** A downloadable file with a supported extension, regardless of size. */ |
| 66 | function isDownloadableFile(entry: DropboxFileEntry): boolean { |
| 67 | return ( |
| 68 | entry['.tag'] === 'file' && entry.is_downloadable !== false && hasSupportedExtension(entry.name) |
| 69 | ) |
| 70 | } |
| 71 | |
| 72 | async function downloadFileContent(accessToken: string, filePath: string): Promise<string> { |
| 73 | const response = await fetchWithRetry('https://content.dropboxapi.com/2/files/download', { |
no test coverage detected