# A039 + A012 Testing (Upload Testing)

**URL:** <https://developer.community.nhs.uk/t/a039-a012-testing-upload-testing/15172>\
**Category:** e-Referral Service FHIR API\
**Tags:** testing\
**Created:** [22 September 2026 12:34 UTC](https://developer.community.nhs.uk/t/a039-a012-testing-upload-testing/15172 "2026-09-22T12:34:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayward](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@hayward](https://developer.community.nhs.uk/u/hayward)\
**Post date:** [22 September 2026 12:34 UTC](https://developer.community.nhs.uk/t/a039-a012-testing-upload-testing/15172/1 "2026-09-22T12:34:06Z")

</div>

Afternoon.

With the new availability of A039 (upload file) and it’s scanning capabilities - Are there any pre-defined files that eRS team may have that will trigger a THREATS\_FOUND or VALIDATION\_FAILED response, when we try associate the uploads via A012 (maintain letter)

I only ask, because instead of dipping a spoon into the cesspool of the internet to try find purposefully “troublesome” files and send them when testing, I am hoping the ERS team has configured a few test or sample **safe** files that will trigger the above responses?

We are due for witness testing this specific functionality in a few weeks, so hoping the witness test team may have example payloads / files perhaps?

Edited: I assume validation failed is likely filetypes that are not on the accepted list. If that is so, then that negates the need for example VALIDATION\_FAILED file.

Thanks.

---

<div class="post-metadata">

**Author:** ![lucy.killick1](https://avatars.discourse-cdn.com/v4/letter/l/fbc32d/32.png) [@lucy.killick1](https://developer.community.nhs.uk/u/lucy.killick1)\
**Post date:** [2 October 2026 15:12 UTC](https://developer.community.nhs.uk/t/a039-a012-testing-upload-testing/15172/2 "2026-10-02T15:12:06Z")

</div>

Hi,

You can use an **EICAR test file** to trigger malware detection [https://www.eicar.org/](https://www.eicar.org/)

VALIDATION\_FAILED – You can place an attachment into this state by using one of the failure cases below:

1. Content type of the file is not supported. 2. Content type of the file does not correlate with the file extension 3. File provided is too large and is not supported by e-RS

Thanks,

Lucy

---

<div class="post-metadata">

**Author:** ![hayward](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@hayward](https://developer.community.nhs.uk/u/hayward)\
**Post date:** [12 October 2026 13:48 UTC](https://developer.community.nhs.uk/t/a039-a012-testing-upload-testing/15172/3 "2026-10-12T13:48:59Z")

</div>

> [@lucy.killick1](#):
>
> Content type of the file does not correlate with the file extension

Hi Lucy.

The EICAR file works perfectly, thank you for that. The steps to get a VALIDATION\_FAILED is still tripping me up (and the witness test folks wanted us to prove we handle it).

Using your three ways to get a VALIDATION\_FAILED response; we:

a) upload a a PDF file some\_pdf\_file.bob (with a .bob file extension) and get a 406 response from the API (REC\_NOT\_ACCEPTABLE - which is fine, but that prevents us linking it to an referral to get the VALIDATION\_FAILED response from A012).

b) uploaded a PDF file (renamed to .png) - and ERS API accepted it, and returned it as AVAILBLE - so it didn’t perform an inspection to ensure the file contents matches the file type. See screenshot attached.

c) Trying a 200 meg valid PDF file, (way above the 100 meg limit) - we get a 422 response from the A039 call with the reason “File size must be between 1 and 104857600 bytes”

I am a bit stymied in how to get an invalid file into the ERS system, in order to try link it to a referral and get the VALIDATION\_FAILED status.

Mismatched filename vs contents:

 ![image](https://europe1.discourse-cdn.com/nhsdigitaldeveloper/original/2X/d/d4f333098377fdf3c589d7edef62a7b9bd26c56d.png)

File too large response from A039 (before we even get to the PUT command)

 ![image](https://europe1.discourse-cdn.com/nhsdigitaldeveloper/original/2X/c/cd0094479377d34b8f68813b83933813a8ac39b1.png)
