![]() If not, it could be the case there is is “bad” profile data still on your system that Brave is still picking up because the profile install path/files (that may be corrupted) are still present on your machine and just keep getting re-read. You might try opening it via keyboard shortut - ctrl shift I for Windows I believe.Īnother possibility: When you uninstalled Brave (any time) did you elect to remove profile/browsing data as well? It should have appeared in a system prompt with a check box. Render_template method via flask or to say, using flask as your web server.This is what I was referring to but I forgot that you were unable to view the window. Note: This works only if you are rendering your HTML file using the ![]() So to serve this get request, we wrote an endpoint that takes the audio file name, reads it from the local directory, and returns it back. When you give the audio file name under src property, this creates a get request in the flask as shown 127.0.0.1 - "GET /Std.mp3 HTTP/1.1" 200 -Īs you can see that, the flask has sent a Get request for the Std.mp3 file. Path_to_audio_file = "C:/Audios/yourFolderPath" audio_file_name In case you are trying to play audio with dynamic paths, by changing src property through JS, then here is a sample implementation using Flask server and HTML. This makes sense because any webpage can't simply give a local path and access your private files. In the case of audio files, when you give, this throws an error saying cannot load local resource. String myEncodedString = HttpUtility.HtmlEncode(result) Į = myEncodedString X.SetAttributeValue("src", "data:" contenttype " base64," Convert.ToBase64String(bytes)) String contenttype = "image/" Path.GetExtension(filename).Replace(".", "") įileStream fs = new FileStream(filePath filename, FileMode.Open, FileAccess.Read) īyte bytes = br.ReadBytes((Int32)fs.Length) ![]() String filename = Path.GetFileName(currentSrcValue) String filePath = Path.GetDirectoryName(currentSrcValue) "\\" String currentSrcValue = x.GetAttributeValue("src", null) Return !string.IsNullOrEmpty(src) //
0 Comments
Leave a Reply. |