# Front end file upload using ajax

**URL:** <https://forum.getkirby.com/t/front-end-file-upload-using-ajax/21918>\
**Category:** Questions\
**Tags:** v3\
**Created:** [April 14, 2021, 8:10pm UTC](https://forum.getkirby.com/t/front-end-file-upload-using-ajax/21918 "2021-04-14T20:10:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsantari](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jsantari](https://forum.getkirby.com/u/jsantari)\
**Post date:** [April 14, 2021, 8:10pm UTC](https://forum.getkirby.com/t/front-end-file-upload-using-ajax/21918/1 "2021-04-14T20:10:54Z")

</div>

I’ve looked at the cookbook " Uploading files from frontend" and was wondering how this approach can be done using an ajax post instead of a full page post. Maybe as a virtual page? Anyone have an example of doing this? I’m using [htmx.org](http://htmx.org) to do the form post and my response will just be simple html so I really don’t need a full template returned.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 14, 2021, 8:28pm UTC](https://forum.getkirby.com/t/front-end-file-upload-using-ajax/21918/2 "2021-04-14T20:28:45Z")

</div>

You can post to a content representation or a route.

> **[Content Representations](https://getkirby.com/docs/guide/templates/content-representations)**

Not your use case, but here you can see how content representation is used with Ajax call:

> **[Load more with Ajax](https://getkirby.com/docs/cookbook/templating/ajax-load-more)**
>
> Add a load more button to your listings and append items via Ajax.
