Support Topics Documentation Slack YouTube Blog

POST request to codeless size limit

i need to upload videos and im using base64
is there a limit to the size of the request?

i got this messge
“Cannot save files created from byte array when the payload exceeds 2,800,000 bytes”

Hello @mohammad_altoiher

My advice to you is not to use base64
There is a topic for a similar problemэ. Maybe this will help you

Regrad, Viktor

But how can I send the data to codeless other than base64?

I need to send it to codeless method to control the file save location and name and also save it in a data table.

Hello @mohammad_altoiher

Our business logic accepts only application/json content type so you can’t upload files using Custom APIServices.

Let’s think about another approach, for instance, you can upload your file into some temp directory and then invoke an API Service with URL to the file, and then move/copy/rename do whatever you need.
What do you think?

Regards, Vlad

ok but when i upload using JS the link is visible to the user who upload it. no restriction i can make.

users can upload files i don’t allow

how can i limit that to only certain extensions and size limit?

@mohammad_altoiher

At the moment, you cant check this until the file is not loaded. If loaded it can be done via JS
I’ve created an internal ticket BKNDLSS-25264 to investigate if we can add file type/size information to before/afterUpload handler

Regard, Viktor

1 Like

can the client-side (UI) put a restriction for the file extensions they can upload?

Yes but its not secure in the client

they have the function to upload anything they want