Skip to content

Commit

Permalink
fix: test -d
Browse files Browse the repository at this point in the history
  • Loading branch information
arpowers committed Aug 31, 2024
1 parent 36858fd commit 94dcc26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion @fiction/core/utils/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export async function getFileExtensionFromFetchResponse(response: Response) {
export function getMimeType(filePath: string, fileMimeType?: string): string {
const ext = path.extname(filePath).toLowerCase()

const mime = mimeTypes[ext] || fileMimeType
const mime = mimeTypes[ext] || fileMimeType || 'application/octet-stream'
if (!mime)
throw new Error(`No mimeType found for file: ${filePath}`)

Expand Down

0 comments on commit 94dcc26

Please sign in to comment.