# Govern Uploaded Files[¶](https://developer.dataiku.com/latest/concepts-and-examples/govern/govern-uploaded-files.html#govern-uploaded-files "Permalink to this heading")

Users can upload files to artifacts.

## Download an uploaded file[¶](https://developer.dataiku.com/latest/concepts-and-examples/govern/govern-uploaded-files.html#download-an-uploaded-file "Permalink to this heading")

§ import dataikuapi

§ host = "http(s)://DSS\_HOST:DSS\_PORT"

§ apiKey = "Your API key secret"

§ client = dataikuapi.GovernClient(host, apiKey)

§ # retrieve a specific artifact of type govern project by its ID

§ artifact = client.get\_artifact('ar.1773')

§ # get the first uploaded file stored in the related\_docs field

§ uf = client.get\_uploaded\_file(artifact.get\_definition().get\_raw()['fields']['related\_docs'][0])

§ # get the file description

§ f\_desc = uf.get\_description()

§ # retrieve the file as a stream

§ f\_stream = uf.download()

## Reference API doc[¶](https://developer.dataiku.com/latest/concepts-and-examples/govern/govern-uploaded-files.html#reference-api-doc "Permalink to this heading")

|  |  |

| --- | --- |

| `dataikuapi.govern.uploaded\_file.GovernUploadedFile`(...) | A handle to interact with an uploaded file Do not create this directly, use `get\_uploaded\_file()` |
