Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
20 replies
Subscribers
7 subscribers
Views
10536 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
How to retrieve the size of a file being uploaded using a!fileUploadField() sail
abhinavg
over 9 years ago
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
Mike Schmitt
Certified Lead Developer
over 9 years ago
I mainly use this to validate proper extension, as i've had requirements that certain file types not be allowed. I should note that this is not "officially" supported functionality, as in, there is no guarantee that the property names won't change in between appian versions, among other things. As such, I strongly suggest that you create external rules to handle taking the temporary document and extracting the name - that way if something ever changes, you only need to update your hanler rule(s) instead of any forms that used the literal property names.
Also just be cautious about using this for just-uploaded files in a grid; this makes it possible but at the same time, you're still going to be dealing with an array of "temporary" document IDs that don't become permanent ones until submit time. I'd strongly recommend continuing to submit the form between uploads, unless you have strong reasons not to.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Mike Schmitt
Certified Lead Developer
over 9 years ago
I mainly use this to validate proper extension, as i've had requirements that certain file types not be allowed. I should note that this is not "officially" supported functionality, as in, there is no guarantee that the property names won't change in between appian versions, among other things. As such, I strongly suggest that you create external rules to handle taking the temporary document and extracting the name - that way if something ever changes, you only need to update your hanler rule(s) instead of any forms that used the literal property names.
Also just be cautious about using this for just-uploaded files in a grid; this makes it possible but at the same time, you're still going to be dealing with an array of "temporary" document IDs that don't become permanent ones until submit time. I'd strongly recommend continuing to submit the form between uploads, unless you have strong reasons not to.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data