fix tests by restoring stubs; hack file upload endpoint to extract JSON settings from the fragment if one exists