Connecting a File to a Patient (Enduser)

<aside> 💡 Most of the time, a file will be associated with a patient. This is done by setting the enduserId field. If you need to match an existing enduser, check out the following page

Patient (Enduser) Lookup

</aside>

Uploading a File

Uploading a file currently takes two steps

1. Prepare File Upload

Use the Prepare File Upload endpoint and set the set the name, size, and type (mime type) to match the file you’re uploading. Set the enduserId to associate with a specific enduser. Set publicRead to true only if you want the file to be publicly accessible by a single URL (strongly discouraged for any file which may contain PHI or other sensitive information).

This returns the file, which has a unique id that you can use later to generate download links, update the name, and more. It also includes a JSON object called presignedUpload which includes the information you’ll need to upload the file itself

2. Upload via Pre-signed POST

Taking the presignedUpload JSON in the response to Prepare File Upload, POST to the .url value with the following details: