devfemibadmus / easyfileshare

EasyFileShare is a lightweight Python web application hosted on Google Compute Engine that simplifies remote file sharing without the need for user accounts. Leveraging the flexibility and simplicity of Flask, EasyFileShare provides a seamless and secure file-sharing experience.

Home Page:https://devfemibadmus.blackstackhub.com/easyfileshare

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rendering image byte to browser

devfemibadmus opened this issue · comments

it works fine when we perform below but doesn't work in webpage like making html img attr

img = Image.open(io.BytesIO(requests.get(file_url).content))
 img_bytes = io.BytesIO()
 img.save(img_bytes, format='PNG')
 img_bytes.seek(0)
response = Response(img_bytes, mimetype='image/png')

could the error be cors? nope i have set some cors rule still thesame then could it be bcus of the process thats done from the url?

but dont want to use send_file
@kcubeterm

fixed i found out i am using cookies even in the get of the image preview all to see lol my entire preview code is a shit......FIXED now and working fine