add api support for uploading a file