Mar-01-2021, 02:43 PM
(Mar-01-2021, 12:41 PM)snippsat Wrote: Again the problem is that this is related to web-framework you are building,which you are not mentioning.
There is different use case from a web-framework that user just open a image in browser.
web-framework serve(not open) static files for eg a folderstatic/images
.
Then bind images path to root url,here a example in Flask.
In example over the link would behttp://127.0.0.1:5000/Joker.png
.
For low level close to WSGI look what's under Flaskl,Werkzeug Serve Shared Static Files
Thanks for the feedback but the framework structure is functional where I can read and view .svg files without any problems! Does this only happen in the case of opening image files? Follow the code below:
o_file = open("cloud.png", "rb") o_file = o_file.read()