# Problem with data property limited to 255 bytes in Particle.publish

**URL:** <https://community.particle.io/t/problem-with-data-property-limited-to-255-bytes-in-particle-publish/16677>\
**Category:** Firmware\
**Created:** [October 18, 2015, 6:47pm UTC](https://community.particle.io/t/problem-with-data-property-limited-to-255-bytes-in-particle-publish/16677 "2015-10-18T18:47:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbt](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@fbt](https://community.particle.io/u/fbt)\
**Post date:** [October 18, 2015, 6:47pm UTC](https://community.particle.io/t/problem-with-data-property-limited-to-255-bytes-in-particle-publish/16677/1 "2015-10-18T18:47:15Z")

</div>

Hi!, my (new) problem is that, on my purpose to send a wav file from a Photon device to a secure server by using web hooks, i’ve seen that, according to the doc, the data field for an event published through the particle cloud is limited to 255 bytes … does it means that it would not be possible to stream audio content directly from the photon device to the secure server? i’m sorry if this is a basic question, and i would like to thank any help from all experts.  
best regards

---

<div class="post-metadata">

**Author:** ![mdma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mdma/32/1924_2.png) [@mdma](https://community.particle.io/u/mdma)\
**Post date:** [October 18, 2015, 8:34pm UTC](https://community.particle.io/t/problem-with-data-property-limited-to-255-bytes-in-particle-publish/16677/2 "2015-10-18T20:34:27Z")

</div>

You don’t want to squeeze your WAV file through `Particle.publish()` That  
would take ages. The limit is 1 message per second, and with each message being 256 bytes, that’s a data throughput of at most 0.25kbytes/s. This is plenty for messaging (what the system is built for) but of course not for streaming.

To upload a WAV to a secure server you can:

1. use the HTTP client library that has (recently gained) SSL support. You could post the data to a given URL.

2. send the data to a trusted local server unencrypted, and have it forward that via HTTPS.

---

<div class="post-metadata">

**Author:** ![fbt](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@fbt](https://community.particle.io/u/fbt)\
**Post date:** [October 19, 2015, 7:07am UTC](https://community.particle.io/t/problem-with-data-property-limited-to-255-bytes-in-particle-publish/16677/3 "2015-10-19T07:07:52Z")

</div>

Thanks @mdma! …  
is the http client library available in Particle IDE?

---

<div class="post-metadata">

**Author:** ![fbt](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@fbt](https://community.particle.io/u/fbt)\
**Post date:** [October 19, 2015, 1:52pm UTC](https://community.particle.io/t/problem-with-data-property-limited-to-255-bytes-in-particle-publish/16677/4 "2015-10-19T13:52:16Z")

</div>

Hi @mdma , is your solution valid in this partcular case? … what i’m trying to do is to perform a request to a secure server from my photon device (https), and by now, tha only solution i find for this is using webhooks. i have already implemented a webhook for sending text commands to this secure server, and it worked fine. tha problem is that for a different aplication, i need to send a wav file fro the photon device to a secure server, so i am implementing a webhoook, bur according to the request format of the server, i should send an authorization header, spacify a content-type, include some optional arguments, and then, put the binary data of the wav file in the body. Is this last step which i don’t know how to implement in a webhook … could you please give me some orientation about that?

---

<div class="post-metadata">

**Author:** ![msolters](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@msolters](https://community.particle.io/u/msolters)\
**Post date:** [October 19, 2015, 2:49pm UTC](https://community.particle.io/t/problem-with-data-property-limited-to-255-bytes-in-particle-publish/16677/5 "2015-10-19T14:49:02Z")

</div>

@fbt, check this out: [https://github.com/glowfishAPI/httpsclient-particle](https://github.com/glowfishAPI/httpsclient-particle)
