# Sending a file

You might need to send a file to your connection(s) to provide clinical or administrative context for patients you share. Typically, you send a file to save to a patient’s chart.

## Supported methods for sending files

With Redox, you can send files to your connection(s) with either of these two methods:

1. <u>Upload and reference a file</u> (_recommended_)
2. <u>Embed a file</u>

|                 | Upload and reference file | Embed file |
| --------------- | ------------------------- | ---------- |
| Best for | Regularly sending large files.This is our recommended method since it improves our ability to process the request without errors. | Occasionally sending small files. |
| File size limit | Up to __30 MB__. The file limit is separate from the overall request limit. For example, if the request limit is 10 MB, the uploaded file doesn’t need to fit within that threshold. | Must fit within the request’s size limit. [Check limits by traffic type](https://docs.redoxengine.com/permalink/6KOwEzjE4jb2DBnQf6PBky/#message-and-file-size-limits). *Best practice*: We recommend not embedding files over __200 KB__.|
| Encoding | base64. Redox handles encoding the file. | base64. You must encode the file yourself. |
| Environment type | *For paid accounts*, available in any environment. *For free accounts*, only available in __staging__ or __production__. If you try to upload files in a development environment with a free account, we return a 403 Forbidden error. | Available in any environment. |
| Available file download in the Redox dashboard | Yes. | No. |

## Supported file types

You can send any valid file type to your connection(s). 

For security reasons, we recommend _not_ sending executable or archived files since they might contain exploitable vectors that could corrupt your connection’s system. Before delivering the request, we use content-inspecting firewalls, which rejects suspicious payloads. 

## Which Redox data models to use

With the <u>**Redox FHIR API**</u>, use the `DocumentReference` resource to send a generic file. Or, if you’re sending a results or vitals document, send it as a FHIR Attachment in the `DiagnosticReport` or `Observation` resources.   

With the <u>**Redox Data Model API**</u>, use the `Media`, `Notes`, or `Results` requests to send a file. 

Check out our how-tos for uploading or embedding files:

- [Send a generic file via the Redox FHIR API](/how-to-use-redox/send-a-file-via-the-redox-fhir-api)
- [Send results or vitals via the Redox FHIR API](/how-to-use-redox/send-results-or-vitals-via-the-redox-fhir-api)
- [Send a file via the Redox Data Model API](/how-to-use-redox/send-a-file-via-redox-data-model-api)

## Alternative methods

Depending on your workflow and integration needs, you might benefit from pushing CDA data to healthcare organizations with <u>**Direct Secure Messaging**</u> instead. [Learn more about DirectTrust](/basics/data-exchange-with-redox/using-directtrust-to-exchange-data-securely).
