Use "animation_url" in the uploaded metadata for storing media file URIs (#27)

* Remove image and animation_url from metadata modal

* Use animation_url for storing audio and video asset URIs

* Use image and animation_url keys together for audio/video assets

* Delete empty metadata keys

* Post-review update
This commit is contained in:
Serkan Reis
2022-08-09 12:08:10 +03:00
committed by GitHub
parent afe2928a9e
commit 986777b73d
4 changed files with 18 additions and 39 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ export type AssetType = 'image' | 'audio' | 'video' | 'unknown'
export const getAssetType = (assetFileName: string): AssetType => {
const assetType = assetFileName?.split('.').pop() || 'unknown'
if (assetType === 'png' || assetType === 'jpg' || assetType === 'jpeg') return 'image'
if (assetType === 'png' || assetType === 'jpg' || assetType === 'jpeg' || assetType === 'svg') return 'image'
if (assetType === 'mp3' || assetType === 'wav') return 'audio'
if (assetType === 'mp4') return 'video'
return 'unknown'