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
    @kumar: basically the only meaningful properties we can extract using this trick are size (abbreviated), and document name. I believe the property to use for name is "uploadedDocumentName", but you can check all the properties available by placing it in a text field, like this:
    a!textField( readOnly: true(), value: a!fileUploadField( value: local!uploadedDocument ) )
Reply
  • 0
    Certified Lead Developer
    @kumar: basically the only meaningful properties we can extract using this trick are size (abbreviated), and document name. I believe the property to use for name is "uploadedDocumentName", but you can check all the properties available by placing it in a text field, like this:
    a!textField( readOnly: true(), value: a!fileUploadField( value: local!uploadedDocument ) )
Children
No Data