This is not necessary. Mojo can do this already. I'm not sure how though... You can start looking at Mojo::Content::MultiPart maybe?