Multimedia hotfixes for bad attachment errors

This should fix Case:78348 from getting triggered again (though we still have to reupload the bad files). was a pretty hilarious set of circumstances causing it to fail.

probably easiest to read commit by commit. the second commit has the fix, and the rest is cleanup