[Answered ]-Django and JavaScript: Using last uploaded file in an object list within in a Javascript file

1👍

Give this a try,

// get the <audio> element
const player = document.querySelector('#player');

// get first source element
source = player.getElementsByTagName('source')[0];

// get file url
url = source.src

request.open('GET', url, true);

or

const url = document.querySelector('#player').getElementsByTagName('source')[0].src;

Leave a comment