Replies: 6 comments 7 replies
-
What web server are you using? Is the route to the file defined in the web server? Does the request for the file get to the server? Is the file visible with os.stat("SD/audio.mp3")? Please include html statement, the tag uses src= and not source= |
Beta Was this translation helpful? Give feedback.
-
I'm stuck. I can't find guides for my goal |
Beta Was this translation helpful? Give feedback.
-
Did you mount the sd card? |
Beta Was this translation helpful? Give feedback.
-
In your code, there is no answer programmed when the browser requests your audio file. The html page will be processed by the browser, but then the browser will send a new request to your server for the audio mp3 file. Your code does not answer to that request. The statement file = open(file_path, 'a') opens the audio file for append, please check that, I could not understand the purpose. For a web server, Microdot is a good option, see https://github.com/miguelgrinberg/microdot What you intend to do should be possible with Microdot. |
Beta Was this translation helpful? Give feedback.
-
Ok, I'm back. New code.
The file html in SDCARD work but the link to audio file don't. Part of HTML code:
Where I wrong? |
Beta Was this translation helpful? Give feedback.
-
microdot load correctly HTML but the link for media don't work ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
i'm designing a simple local web server to listen to music via html audio player.
I using an ESP32 and a microSD card reader. The local network connection works and I view my html page and the microSD reader writes and reads .txt files. How can I access, via html code, an audio file in the sdcard? Typing
source=SD/audio.mp3
in the html section, it finds nothing. Thank you!Beta Was this translation helpful? Give feedback.
All reactions