How to identify File size before form submit

Hello All,

We are using fileUploadField() in editable grid to upload a new document and
we want to show the file size of newly uploaded document to be reflected immediately in one of the columns of the grid without submitting the form.

Any help is greatly appreciated.

Thanks,
Sonakshi

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Ok I still don't understand - an editable grid row can contain a file upload component. The file upload component displays the size of the file when you upload it:

    What's missing from your requirement that isn't satisfied with this? (also: why do the business users need to know - or care - about the size of the file? If there's a limitation on the size of file they can upload then you'll need to add some validation to your file upload component)

  • Thanks Stewart!

    Agree,The file upload component displays the size of the file when you upload it but there is size column in grid to show size of document. After clicking on related action showing document in grid with size that are fetch from DB but user can upload at runtime and need to populate size of newly added document in grid.

    Also, while uploading there is no limitation but there is limitation while sending to third part system(there is validation while sending to external system). Purpose of showing document size in grid is that user can see big documents and can process those document in other system or make it inactive so it wont available for sending.

  • If the "rules" that determine whether a User processes a "document in other system or make it inactive so it wont available for sending" can be codified then you should automate it, not leave it to the User to decide. You can access an uploaded document's properties in a rule and then route the document accordingly. A User making this decision does not seem to add any value .

  • This works too but user wants them to decide which one to inactive.

    Will discuss this with Business in more details.

    Thanks Stewart for your help.