Fixes to api handler and file upload logic