Save and access png (or arbitrary data)

Forums: 

Dear Community,

I am looking for a way save pngs to eg. moodle and then access this file from the reporting view.

Unfortunately we are required to make no plugin customizations (or generally in the server). I first tried to save the <img> tag with the base64-string of the png in the database via xApi (using the long-fill-in type so that the tag will be rendered properly in the provided textbox), but the html-purifier (from the h5p plugin) gets in the way, so that the "data"-part before the MIME-Type decleration is removed.

Obviously it only accepts links for the src-attribute, so that a solution to write a png to moodle from the h5p-script and then using the url afterwards would be nice.

Thanks in advance!

Matthias