Skip to content

Commit

Permalink
Add new format: svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Aug 15, 2023
1 parent a9aa02b commit b0a7ec8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/util/shared/src/lib/links/link-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ describe('link utils', () => {
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
],
['csv', 'csv', 'application/csv'],
['svg', 'svg', 'image/svg+xml'],
]

describe.each(toTest)(
Expand Down
6 changes: 6 additions & 0 deletions libs/util/shared/src/lib/links/link-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ export const FORMATS = {
color: '#673ab7',
mimeTypes: ['image/jpg'],
},
svg: {
extensions: ['svg'],
priority: 9,
color: '#d98294',
mimeTypes: ['image/svg+xml'],
},
}

export function sortPriority(link: MetadataLink): number {
Expand Down

0 comments on commit b0a7ec8

Please sign in to comment.