# Code for Xojo to Xojo File Transfer

**URL:** <https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296>\
**Category:** General\
**Created:** [November 27, 2023, 4:45pm UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296 "2023-11-27T16:45:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bart\_Davis](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/ba8739/32.png) [@Bart\_Davis](https://forum.xojo.com/u/Bart_Davis)\
**Post date:** [November 27, 2023, 4:45pm UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296/1 "2023-11-27T16:45:33Z")

</div>

Is anyone willing to share code for large-file, high-speed data transfer between Xojo applications?

Thanks!  
Bart

---

<div class="post-metadata">

**Author:** ![Eric\_Williams](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/ecccb3/32.png) [@Eric\_Williams](https://forum.xojo.com/u/Eric_Williams)\
**Post date:** [November 27, 2023, 5:07pm UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296/2 "2023-11-27T17:07:50Z")

</div>

How big?  
Over the local network, over the internet, or on the same machine?  
Cross platform?  
Need to preserve file attributes (permissions, creation date, etc)?

---

<div class="post-metadata">

**Author:** ![Bart\_Davis](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/ba8739/32.png) [@Bart\_Davis](https://forum.xojo.com/u/Bart_Davis)\
**Post date:** [November 27, 2023, 5:13pm UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296/3 "2023-11-27T17:13:47Z")

</div>

Files can be multiple GB and will need to be transferred over the internet. The majority will be zip files.

---

<div class="post-metadata">

**Author:** ![Eric\_Williams](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/ecccb3/32.png) [@Eric\_Williams](https://forum.xojo.com/u/Eric_Williams)\
**Post date:** [November 28, 2023, 5:09am UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296/4 "2023-11-28T05:09:43Z")

</div>

I’ve implemented something like this in the past using EasyTCPSocket. Unfortunately, it was at a former job and I don’t have rights to the code, so I can’t share it.

Essentially, you need to come up with a tiny protocol that tells the recipient of the transfer any metadata about the file you want preserved: filename, creation date, etc. The protocol then defines how the file itself is transferred. I like to have it include the number of bytes to expect so that both sides can display a progress bar as the transfer progresses. Since your files are potentially rather large, I suggest using 64bit unsigned integers for this - I made the mistake of using 32bit values and regretted it the day my transfer exceeded 4GB.

It’s been years and the details are fuzzy… but I think that EasyTCPSocket doesn’t deal well with being handed a huge blob of data to transfer. I believe I ended up chunking the data first.

Maybe that’s enough to get you started?

---

<div class="post-metadata">

**Author:** ![Georgios\_Poulopoulos](https://forum.xojo.com/user_avatar/forum.xojo.com/georgios_poulopoulos/32/16905_2.png) [@Georgios\_Poulopoulos](https://forum.xojo.com/u/Georgios_Poulopoulos)\
**Post date:** [November 28, 2023, 10:12am UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296/5 "2023-11-28T10:12:33Z")

</div>

If you’re interested in HTTP transfer, you might want to take a look at [fswebapi](https://github.com/gregorplop/fswebapi)

Mind you, it doesn’t currently implement any functional user authentication or resource authorization, but work has started towards that goal. It will make use of [picoACL](https://github.com/gregorplop/picoACL)

I’m the maintainer of both projects, I just don’t have the time to put the necessary work anymore. It will happen at some point, but not soon.

---

<div class="post-metadata">

**Author:** ![Jean\_Luc\_Pellerin](https://forum.xojo.com/user_avatar/forum.xojo.com/jean_luc_pellerin/32/11479_2.png) [@Jean\_Luc\_Pellerin](https://forum.xojo.com/u/Jean_Luc_Pellerin)\
**Post date:** [November 28, 2023, 12:51pm UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296/6 "2023-11-28T12:51:14Z")

</div>

I make this in old sofware.  
I used the mail

---

<div class="post-metadata">

**Author:** ![Bart\_Davis](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/ba8739/32.png) [@Bart\_Davis](https://forum.xojo.com/u/Bart_Davis)\
**Post date:** [November 29, 2023, 4:17pm UTC](https://forum.xojo.com/t/code-for-xojo-to-xojo-file-transfer/78296/7 "2023-11-29T16:17:29Z")

</div>

Thanks to all for the help. I’ll post an update when I have working code.
