Is there a way to check binary data file size (from the upload widget) on client side vs sending the whole binary to a server action to check it?
Given an Upload widget named "FileUpload":
You can use the following JavaScript snippet to extract file size information in Bytes:
var fileInputElem = document.getElementById($parameters.FileUploadId); $parameters.FileSizeBytes = fileInputElem.files[0].size;
Passing the Widgets.FileUpload.Id as parameter to the JS Snippet:
This does not seem to work anymore. I get:
Cannot read properties of undefined (reading '0')
I found another solution that worked for me:https://www.outsystems.com/forums/discussion/95463/binary-data-size/
The solution is in the given OML.
The above works and I found that the binary data actions react forge component also just (or since I last updated it) updated to include a react client side file size action.