# Chunked upload with xhr

**URL:** <https://community.transloadit.com/t/chunked-upload-with-xhr/15036>\
**Category:** Uppy\
**Created:** [August 29, 2019, 3:13pm UTC](https://community.transloadit.com/t/chunked-upload-with-xhr/15036 "2019-08-29T15:13:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshaybabloo](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/akshaybabloo/32/151_2.png) [@akshaybabloo](https://community.transloadit.com/u/akshaybabloo)\
**Post date:** [August 29, 2019, 3:13pm UTC](https://community.transloadit.com/t/chunked-upload-with-xhr/15036/1 "2019-08-29T15:13:58Z")

</div>

Is it possible to upload data as chunks with XHRUpload? An example would be great.

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [August 29, 2019, 4:18pm UTC](https://community.transloadit.com/t/chunked-upload-with-xhr/15036/2 "2019-08-29T16:18:32Z")

</div>

I think what you are looking for is tus, did you check that out?

---

<div class="post-metadata">

**Author:** ![akshaybabloo](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/akshaybabloo/32/151_2.png) [@akshaybabloo](https://community.transloadit.com/u/akshaybabloo)\
**Post date:** [August 31, 2019, 3:00am UTC](https://community.transloadit.com/t/chunked-upload-with-xhr/15036/3 "2019-08-31T03:00:05Z")

</div>

Tus has it’s own protocol and I can’t combine it with xhr. Or can I?

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [September 10, 2019, 8:29am UTC](https://community.transloadit.com/t/chunked-upload-with-xhr/15036/4 "2019-09-10T08:29:10Z")

</div>

Right but tus-js-client works via xhr, so any reason you need a custom protocol vs picking one from off the shelve that’s seen a lot of usage/improvements?

---

<div class="post-metadata">

**Author:** ![akshaybabloo](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/akshaybabloo/32/151_2.png) [@akshaybabloo](https://community.transloadit.com/u/akshaybabloo)\
**Post date:** [September 10, 2019, 11:09am UTC](https://community.transloadit.com/t/chunked-upload-with-xhr/15036/5 "2019-09-10T11:09:44Z")

</div>

I am not going for a custom protocol. I have a Django backend but I am not sure if I can use tus-js with the one you guys have? Because with XHR it’s straight forward, just POST data to a URL and I am not use with tus.

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [September 10, 2019, 11:12am UTC](https://community.transloadit.com/t/chunked-upload-with-xhr/15036/6 "2019-09-10T11:12:56Z")

</div>

If you just want an Xhr, you should use the Xhr plugin. That does what you describe.

If you want chunks, like you said earlier, for resumability or parallel/faster uploads, you’ll need to layer some protocol on top of Xhr that the server side understands. You can do this from scratch or use [tus.io](http://tus.io). There are python implementations that can handle tus uploads, see [https://tus.io/implementations.html](https://tus.io/implementations.html) (flash & django).

Does that help?
