Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2363

Return an image from a custom webservice

$
0
0
by Michael Troy.  

Hi all,

I have images saved in the moodledata folder that I'd like to return via a webservice. Most of it is already working, I can access the image as intended but I can't return it properly. What I need is something similar to this

https://openslide-demo.s3.dualstack.us-east-1.amazonaws.com/aperio/cmu-1/slide_files/13/7_2.jpeg?v=261d9b83

Any way I can set "Content-Type: image/jpeg" to the response header and the image as the response? Please note that the images are not moodle file-records but just generic files.

Thanks in advance smile

Viewing all articles
Browse latest Browse all 2363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>