How to retrieve the size of a file being uploaded using a!fileUploadField() sail

How to retrieve the size of a file being uploaded using a!fileUploadField() sail component on sail form and restricts the user to upload a file larger than a certain limit.

Is it correct that document(ri!file, "size") will work only when form is being submitted as document being uploaded is being saved on Appian DMS and not before if sail form is not being submitted

Attached a sail form snippet, need to capture the size being circle on form

Thanks !


OriginalPostID-141769

OriginalPostID-141769

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    @Abhi: i think you might find Eduardo's suggestion of post-form validation to work rather well - in my case, when validation fails after submission, the gateway loops through a delete document node and the failed document is removed right away, then it loops straight back into the form where I display a SAIL-style validation message. To the user, it seems as if they never left the form and that the "upload" button just failed.
Reply
  • 0
    Certified Lead Developer
    @Abhi: i think you might find Eduardo's suggestion of post-form validation to work rather well - in my case, when validation fails after submission, the gateway loops through a delete document node and the failed document is removed right away, then it loops straight back into the form where I display a SAIL-style validation message. To the user, it seems as if they never left the form and that the "upload" button just failed.
Children
No Data