The code from @rssdev10 in this post actually works fine (for uploading one file).
If using Mux, the code is then the following:
file_content = parse_multipart(req[:data])
write("test.png",file_content)
With parse_multipart
being given in the post aforementioned