(fileKey: string)
| 72 | return candidates[0]?.key ?? null; |
| 73 | }; |
| 74 | const getFileExtensionFromKey = (fileKey: string) => { |
| 75 | const fileName = fileKey.split("/").at(-1) ?? ""; |
| 76 | const extension = fileName.split(".").at(-1)?.toLowerCase(); |
| 77 | |
| 78 | if (!extension || extension === fileName.toLowerCase()) { |
| 79 | return null; |
| 80 | } |
| 81 | |
| 82 | return extension; |
| 83 | }; |
| 84 | |
| 85 | type UploadProgressUpdateInput = Schema.Type< |
| 86 | typeof Video.UploadProgressUpdateInput |