# audio controls cannot be played

**URL:** <https://forum.djangoproject.com/t/audio-controls-cannot-be-played/14114>\
**Category:** Templates & Frontend\
**Created:** [June 4, 2022, 6:54am UTC](https://forum.djangoproject.com/t/audio-controls-cannot-be-played/14114 "2022-06-04T06:54:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tifs73](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@tifs73](https://forum.djangoproject.com/u/tifs73)\
**Post date:** [June 4, 2022, 6:54am UTC](https://forum.djangoproject.com/t/audio-controls-cannot-be-played/14114/1 "2022-06-04T06:54:04Z")

</div>

so i want play music from local storage, but the music cannot be played. at terminal it says not found the folder. but when i open again the website, the music can be played. but when i uploaded new music, the music cannot be played again. at my terminal like this::

 ![terminal1](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/5/55ceca61df0d016dac40bd1d3227edeb30f38f54.png)

html

```auto
<audio controls="controls">
        <source src="/media/mp3/{{last_audio.audio}}" type="audio/mpeg">
</audio>

```

views

```auto
def homepage(request):
    form = AudioForm()
    last_audio = Audio_store.objects.last()
    if request.method == "POST":
        form = AudioForm(request.POST, request.FILES)
        if form.is_valid():
            form.save()
            audio = form.cleaned_data.get("audio")
            print(audio)
            context={'form':form, 'last_audio':audio}
        return render(request, 'homepage.html', context)

    context={'form':form, 'last_audio':last_audio}
    return render(request, "homepage.html", context=context)

```

---

<div class="post-metadata">

**Author:** ![nemecek\_f](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nemecek_f/32/668_2.png) [@nemecek\_f](https://forum.djangoproject.com/u/nemecek_f)\
**Post date:** [June 4, 2022, 8:10am UTC](https://forum.djangoproject.com/t/audio-controls-cannot-be-played/14114/2 "2022-06-04T08:10:50Z")

</div>

Hi, did you check the resulting HTML if the path to the audio file is correct? Are you using the `FileField`?

I think you should use something like `last_audio.audio.url` and without the prefix.

---

<div class="post-metadata">

**Author:** ![tifs73](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@tifs73](https://forum.djangoproject.com/u/tifs73)\
**Post date:** [June 4, 2022, 3:10pm UTC](https://forum.djangoproject.com/t/audio-controls-cannot-be-played/14114/3 "2022-06-04T15:10:45Z")

</div>

yes, im using FileField. what do you mean without prefix? actually now the audio controls appear, but the music cannot be played. do you know what’s wrong?
