add files through api.php using the new file controller