Hopefully this works now better with file uploads