> For the complete documentation index, see [llms.txt](https://formdr.gitbook.io/formdr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://formdr.gitbook.io/formdr/documentation/files/upload-file.md).

# Upload file

## Returns an s3 presigned URL for upload

<mark style="color:orange;">`PUT`</mark> `https://api.formdr.com/api/v1/practice/{practiceId}/submissions/{submissionId}`

#### Path Parameters

| Name                                           | Type   | Description   |
| ---------------------------------------------- | ------ | ------------- |
| practiceId<mark style="color:red;">\*</mark>   | String | Practice ID   |
| submissionId<mark style="color:red;">\*</mark> | String | Submission ID |

#### Request Body

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| fileName<mark style="color:red;">\*</mark>  | String |             |
| mimeType<mark style="color:red;">\*</mark>  | String |             |
| fileSize<mark style="color:red;">\*</mark>  | Number |             |
| fieldName<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK " %}

```javascript
"s3 presigned URL"
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
fieldName must match the field name of the file upload to display on the form.
{% endhint %}

{% hint style="danger" %}
If a file already exists for a field, it will be replaced by the upload.
{% endhint %}
