Check uploaded file size via Codeless

Hi

Is there any way to check file size via Codeless? I need it to set limit on uploaded file size from user.

1 Like

I have put a similar request into the Forum specific for images. See

Checking the file size would be another essential feature for the onBeforeUpload event.

Hi @irwancheung

Currently there is no such possibility. We will discuss it with our team.

Best Regards,
Maksym

1 Like

Actually, it is entirely possible. Here’s a sample service I put together:

Here’s a sample invocation:

Hope this helps!

Regards,
Mark

1 Like

@irwancheung , please see above :arrow_up:

Works like a charm! Thanks, Mark.

@mark-piller : This only works for “include subdirectory: true”. Setting this to “false” returns the error:

400 - Cannot read property 'size' of undefined
{
    "code": 0,
    "message": "Cannot read property 'size' of undefined",
    "errorData": {}
}

Is this as expected?
Thanks

Not, including subdirectories is not required. The error tells me the “directory listing” block returned 0 results.