Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Receiving and then Serving image files

So I get an image file with the following sample URL (http://localhost:8096/image/blah). I would like to then serve this image via a flask route.

So I have at the moment

@app.route('/image/blah')
def __blahimage():
import requests
r = requests.get('http://localhost:8096/image/blah')
#Response 200
return send_file(r.text)

This does not seem to be the correct way. I'm new to Python in general and the reason I'm doing this is because the images are available on a local server only. The flask is a wrapper essentially.

/r/flask
https://redd.it/cfka7t