Skip to content

Commit

Permalink
add alert on filedisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
KalliSfak committed Oct 17, 2023
1 parent a6b43d4 commit e2b9a5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<AudioDisplay
v-else-if="hasAudioMimeType"
:src="fileProperties.url"
@error="onAddAlert"
></AudioDisplay>
<FileDescription
:name="fileProperties.name"
Expand Down
4 changes: 4 additions & 0 deletions src/utils/fileHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ export function isVideoMimeType(mimeType: string): boolean {
mimeType === "application/ogg"
);
}

export function isAudioMimeType(mimeType: string): boolean {
return mimeType.startsWith("audio/");
}

0 comments on commit e2b9a5d

Please sign in to comment.