diff --git a/watson_developer_cloud/discovery_v1.py b/watson_developer_cloud/discovery_v1.py
index 829baee4..c90e971d 100644
--- a/watson_developer_cloud/discovery_v1.py
+++ b/watson_developer_cloud/discovery_v1.py
@@ -215,7 +215,13 @@ class DiscoveryV1(WatsonDeveloperCloudService):
                             params={'version': latest_version},
                             accept_json=True)
 
-    def add_document(self, environment_id, collection_id, fileinfo, metadata=None):
+    def add_document(self,
+                     environment_id,
+                     collection_id,
+                     file_info=None,
+                     file_data=None,
+                     mime_type=None,
+                     metadata=None):
         url_string = '/v1/environments/{0}/collections/{1}/documents'.format(
             environment_id, collection_id)
 
@@ -224,15 +230,24 @@ class DiscoveryV1(WatsonDeveloperCloudService):
         if metadata is None:
             metadata = {}
 
-        mime_type = mimetypes.guess_type(
-            fileinfo.name)[0] or 'application/octet-stream'
+        file_tuple = None
+
+        if file_info:
+            mime_type = mime_type or mimetypes.guess_type(
+                file_info.name)[0]
+            file_tuple = (file_info.name, file_info, mime_type)
+        elif file_data:
+            file_tuple = ('tmpfile', file_data, mime_type or
+                          'application/html')
 
         return self.request(method='POST',
                             url=url_string,
                             params=params,
                             data=metadata,
-                            files={'file': (fileinfo.name, fileinfo, mime_type),
-                                   'metadata': (None, json.dumps(metadata), 'application/json')},
+                            files={'file': file_tuple,
+                                   'metadata': (None,
+                                                json.dumps(metadata),
+                                                'application/json')},
                             accept_json=True)
 
     def test_document(self, environment_id, fileinfo, configuration_id=None, metadata=None):

WDS add document only allows files
The add_document method for discovery only allows file objects.  It should also allow the addition of data in a string buffer as well as file objects. 
diff --git a/test/test_discovery_v1.py b/test/test_discovery_v1.py
index 3c22464d..faab8148 100644
--- a/test/test_discovery_v1.py
+++ b/test/test_discovery_v1.py
@@ -330,9 +330,7 @@ def test_document():
                   content_type='application/json')
 
     with open(os.path.join(os.getcwd(), 'resources', 'simple.html')) as fileinfo:
-        conf_id = discovery.add_document(environment_id='envid',
-                                         collection_id='collid',
-                                         fileinfo=fileinfo)
+        conf_id = discovery.add_document(environment_id='envid', collection_id='collid', file_info=fileinfo)
         assert conf_id != None
 
     assert len(responses.calls) == 4
@@ -341,4 +339,20 @@ def test_document():
                               collection_id='collid',
                               document_id='docid')
 
-    assert len(responses.calls) == 5
\ No newline at end of file
+    assert len(responses.calls) == 5
+
+
+    conf_id = discovery.add_document(environment_id='envid', collection_id='collid', file_data='my string of file')
+
+
+    assert len(responses.calls) == 6
+
+    conf_id = discovery.add_document(environment_id='envid', collection_id='collid', file_data='my string of file',
+                                     mime_type='application/html')
+
+    assert len(responses.calls) == 7
+
+    conf_id = discovery.add_document(environment_id='envid', collection_id='collid', file_data='my string of file',
+                                     mime_type='application/html', metadata={'stuff': 'woot!'})
+
+    assert len(responses.calls) == 8

pip install -e .
parse_log_pytest
requirements.txt
pytest>=2.8.2 responses>=0.4.0 python_dotenv>=0.1.5 pytest
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pysolr==3.10.0
pytest==7.0.1
python-dotenv==0.20.0
requests==2.27.1
responses==0.17.0
six==1.17.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
-e git+https://github.com/watson-developer-cloud/python-sdk.git@579b387c79933d821bc3e6afb2b67231e67f31ed#egg=watson_developer_cloud
zipp==3.6.0

name: python-sdk
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - argparse==1.4.0
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pysolr==3.10.0
      - pytest==7.0.1
      - python-dotenv==0.20.0
      - requests==2.27.1
      - responses==0.17.0
      - six==1.17.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/python-sdk

test/test_discovery_v1.py::test_document
test/test_discovery_v1.py::test_environments test/test_discovery_v1.py::test_get_environment test/test_discovery_v1.py::test_create_environment test/test_discovery_v1.py::test_update_environment test/test_discovery_v1.py::test_delete_environment test/test_discovery_v1.py::test_collections test/test_discovery_v1.py::test_collection test/test_discovery_v1.py::test_query test/test_discovery_v1.py::test_configs test/test_discovery_v1.py::test_empty_configs test/test_discovery_v1.py::test_no_configs
watson_developer_cloud/discovery_v1.py
watson_developer_cloud/discovery_v1.py