tweaks to support file uploads