<p>This will be possible as of the next Craft release, which will be 3.4.21: <a href="https://github.com/craftcms/cms/commit/a787fe0ef37841706a5a9910fbeae0391da3be6f" rel="nofollow noreferrer">https://github.com/craftcms/cms/commit/a787fe0ef37841706a5a9910fbeae0391da3be6f</a></p>

CC BY-SA 4.0
2020-05-20T17:53:35.907Z
2020-05-20T17:53:35.907Z
Brad Bell
<p>I upload files on the frontend using AJAX requests to <code>actionUpload</code> controller. When file is uploaded, I immediately display it using filename returned by controller. </p>

<p>In case if filename conflict, the duplicate file is created, with a name like <code>something_200518_221543.jpg</code>. How can I retrieve this duplicate filename, so I can display this file too? In control panel, this duplicate filename is somehow appended to the page, but I don't know how - there is no request that returns this new filename from backend.</p>

<assets><controller>
How is conflicting asset filename created
# How is conflicting asset filename created

(Asked by: username_0 on 2020-05-19)

I upload files on the frontend using AJAX requests to `actionUpload` controller. When file is uploaded, I immediately display it using filename returned by controller.

In case if filename conflict, the duplicate file is created, with a name like `something_200518_221543.jpg`. How can I retrieve this duplicate filename, so I can display this file too? In control panel, this duplicate filename is somehow appended to the page, but I don't know how - there is no request that returns this new filename from backend.

**Tags:** assets, controller

---

## 1 answers

### Answer by username_1 on 2020-05-20. Score: 1 | Accepted answer

This will be possible as of the next Craft release, which will be 3.4.21: <https://github.com/craftcms/cms/commit/a787fe0ef37841706a5a9910fbeae0391da3be6f>


---

