diff --git a/dropbox/README.md b/dropbox/README.md index ae077eb71..d2121aae8 100644 --- a/dropbox/README.md +++ b/dropbox/README.md @@ -6,6 +6,8 @@ This package is a utility for connecting Cohere to Dropbox, featuring a simple l The Dropbox connector currently searches for all active files within your Dropbox instance. Note that new files added will require a couple minutes of indexing time to be searchable. Dropbox usually takes less than 5 minutes. +Currently, file contents are not decoded. + ## Configuration To use the Dropbox connector, first create an app in the [Developer App Console](https://www.dropbox.com/developers/apps). Select Scoped Access, and give it the access type it needs. Note that `App folder` access will give your app access to a folder specifically created for your app, while `Full Dropbox` access will give your app access to all files and folders currently in your Dropbox instance. diff --git a/dropbox/provider/__init__.py b/dropbox/provider/__init__.py index 6c2834bdb..ca32805cd 100644 --- a/dropbox/provider/__init__.py +++ b/dropbox/provider/__init__.py @@ -30,4 +30,5 @@ def create_app() -> connexion.FlaskApp: 1 ].upper() # Current directory name, upper-cased flask_app.config.from_prefixed_env(config_prefix) + flask_app.config["APP_ID"] = config_prefix return flask_app diff --git a/dropbox/provider/app.py b/dropbox/provider/app.py index 237b2f816..0bb6e4769 100644 --- a/dropbox/provider/app.py +++ b/dropbox/provider/app.py @@ -24,7 +24,7 @@ def search(body): except UpstreamProviderError as error: logger.error(f"Upstream search error: {error.message}") abort(502, error.message) - return {"results": data} + return {"results": data}, 200, {"X-Connector-Id": app.config.get("APP_ID")} def apikey_auth(token):