def upload_file(self, name, folder_id, file_path):
        """Upload a file into a folder.

        Use function for small file otherwise there is the chunk_upload_file() function

        Args::
            name (str): Name of the file on your Box storage.

            folder_id (int): ID of the folder where to upload the file.

            file_path (str): Local path of the file to upload.

        Returns:
            dict. Response from Box.

        Raises:
            BoxError: An error response is returned from Box (status_code >= 400).

            BoxHttpResponseError: Response from Box is malformed.

            requests.exceptions.*: Any connection related problem.
        """
        try:
            return self.__do_upload_file(name, folder_id, file_path)
        except BoxError, ex:
            if ex.status != 401:
                raise
            #tokens had been refreshed, so we start again the upload
            return self.__do_upload_file(name, folder_id, file_path)
Upload a file into a folder.

        Use function for small file otherwise there is the chunk_upload_file() function

        Args::
            name (str): Name of the file on your Box storage.

            folder_id (int): ID of the folder where to upload the file.

            file_path (str): Local path of the file to upload.

        Returns:
            dict. Response from Box.

        Raises:
            BoxError: An error response is returned from Box (status_code >= 400).

            BoxHttpResponseError: Response from Box is malformed.

            requests.exceptions.*: Any connection related problem.