Maximum size of file upload to experience endpoint

From Chunked upload using Zephyr's http client with HTTP_POST, it seems like the file size limit is 256K. However, I haven’t been able to upload a file larger than 71K to Losant. I am able to upload 256K+ to an AWS S3 bucket.

For our system is there a setting that limits the file size? We would like to send files of around 200K.

Response data: HTTP/1.1 413 Payload Too Large
{ “error”: “Request larger than max payload size” }

I reviewed File upload from experience - max payload size, but didn’t find a solution to my problem.

it seems like the file size limit is 256K. However, I haven’t been able to upload a file larger than 71K to Losant.

A point of clarification - the maximum initial payload size is 256KB. Some of that is going to be the boilerplate information you see come through the request trigger. Now, that’s nothing close to ~185KB of data as this would suggest, so my first thought is that the 71KB file is actually much larger than that when going over the wire, as in your previous post you mentioned “binary files” and that is typically going to be a larger encoding than whatever is holding the files on disk on your hardware.

For our system is there a setting that limits the file size? We would like to send files of around 200K.

Sorry but no, this is a global setting applied to our public cloud and we cannot increase it on a per-user basis. It can only be increased by running a private installation of Losant, and even then we do not recommend it.


Reading between the lines, it seems to me that your goal here is to upload a file from an edge device through an experience endpoint; parse the contents of that file within a workflow execution; and then, I assume, take some other action based on the content of the file. So far we’ve only covered the “how” and not the “why”; if you can tell us more about the real-world use case, we may have other options we can recommend. For example, does this file contain telemetry data you wish to record as device state? Is it meta configuration that needs to be updated within a data table?


Also, you linked to a thread where we created a template for allowing experience users to upload files from a form. We have another template that may fit your use case better: Publish Edge Files to Application Files. This will at least help you get the file off the device and into your cloud application - though note that Application Files should be considered public as accessing their URLs do not require authorization.

Later this week, we have another feature coming out that you may also find helpful in this solution.

Today’s release includes a File Trigger, which can execute a workflow on addition, change, or removal of an Application File. That may be useful in the solution you are putting together here, as this effectively gives you a callback to when a file upload has completed. You could then read the file contents and do whatever other actions you are taking in the workflow run.

If you have any questions, please let us know!

The file size is in bytes. The size is what I expect on the embedded filesystem (Zephyr and littlefs), Losant, and in the AWS S3 bucket. My definition of a binary file is that the file is not stored as text (ASCII, UTF-8, …) with the understanding that at the lowest level everything is binary.

We have decided to use Losant to get a pre-signed URL and send the file directly to an S3 bucket.