Upload an image

        :param image_file: File-like object of an image file
        :param referer_url: Referer site URL
        :param title: Site title
        :param desc: Comment
        :param created_at: Image's created time in unix time
        :param collection_id: Collection ID

def upload_image(self,
                     image_file,
                     referer_url=None,
                     title=None,
                     desc=None,
                     created_at=None,
                     collection_id=None):
        """Upload an image

        :param image_file: File-like object of an image file
        :param referer_url: Referer site URL
        :param title: Site title
        :param desc: Comment
        :param created_at: Image's created time in unix time
        :param collection_id: Collection ID
        """
        url = self.upload_url + '/api/upload'
        data = {}
        if referer_url is not None:
            data['referer_url'] = referer_url
        if title is not None:
            data['title'] = title
        if desc is not None:
            data['desc'] = desc
        if created_at is not None:
            data['created_at'] = str(created_at)
        if collection_id is not None:
            data['collection_id'] = collection_id
        files = {
            'imagedata': image_file
        }
        response = self._request_url(
            url, 'post', data=data, files=files, with_access_token=True)
        headers, result = self._parse_and_check(response)
        return Image.from_dict(result)