Uploading audio files and MediaPicker3
j

jacksorjacksor (Richard Jackson)

over 1 year ago
Hi! I'm trying to upload multiple audio files but am struggling with what editor to use. I'd assumed I would use
MediaPicker3
, with allowed type being the built-in
umbracoMediaAudio
. However,
MediaPicker3
is, as [per docs](https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3), returning
MediaWithCrops
- this implies that
MediaPicker3
is intended for images specifically, not other types of media (not audio or video). Could someone please give me direction as to: 1. What would be the most appropriate editor to use for an author to upload/select audio files? 2. What the Razor would look like to get an
umbracoMediaAudio
property from whatever is returned in 1. I also tried casting the
MediaWithCrops
to type
UmbracoMediaAudio
but that returned
null
. Any direction would be greatly appreciated! Various code snippets included, can provide more details if required. Cheers! Rich Umbraco 13.4.1 https://cdn.discordapp.com/attachments/1271200299041816606/1271200299394269265/image.png?ex=66b67909&is=66b52789&hm=99214c089e934f27021b06940cfee9839594e1e77235aa614878c18052b6a4c3& https://cdn.discordapp.com/attachments/1271200299041816606/1271200299868098652/image.png?ex=66b67909&is=66b52789&hm=1a551ab120dd4099c2271dfda8bd02acece02610d63555ce7ee5b8ffe0c63c0e& https://cdn.discordapp.com/attachments/1271200299041816606/1271200300149248030/image.png?ex=66b67909&is=66b52789&hm=a2f765742f26248bcfad76c8f72049d89fabacf357cc9df8e2fb2a15168e5c22&