Upload an object to a bucket.

        :param str instance: A Yamcs instance name.
        :param str bucket_name: The name of the bucket.
        :param str object_name: The target name of the object.
        :param file file_obj: The file (or file-like object) to upload.
        :param str content_type: The content type associated to this object.
                                 This is mainly useful when accessing an object
                                 directly via a web browser. If unspecified, a
                                 content type *may* be automatically derived
                                 from the specified ``file_obj``.

def upload_object(self, instance, bucket_name, object_name, file_obj,
                      content_type=None):
        """
        Upload an object to a bucket.

        :param str instance: A Yamcs instance name.
        :param str bucket_name: The name of the bucket.
        :param str object_name: The target name of the object.
        :param file file_obj: The file (or file-like object) to upload.
        :param str content_type: The content type associated to this object.
                                 This is mainly useful when accessing an object
                                 directly via a web browser. If unspecified, a
                                 content type *may* be automatically derived
                                 from the specified ``file_obj``.
        """
        url = '/buckets/{}/{}/{}'.format(instance, bucket_name, object_name)
        with open(file_obj, 'rb') as f:
            if content_type:
                files = {object_name: (object_name, f, content_type)}
            else:
                files = {object_name: (object_name, f)}
            self._client.request(path=url, method='post', files=files)