Receive eventlogic node to the logic canvas, then select
Advanced custom eventfrom the dropdown menu on the right hand side of the screen. After selecting it, there should be an popup that asks for the name of the event. In this case, it is
onFileUploadProgress. You should also name your event node to something descriptive, like "On file upload progress".
Receive eventlogic node, we'll use a variable to store the data from the latest event, so we can e.g. use it as basis for a progress bar or similar.
Any valuetype as the variable type, to prevent incompatible schemas. Alternatively, you can make the variable have the same schema as the event object – the schema for the file upload event is described below. After you have the variable setup, you can set its value to be the output of the
Receive eventnode, by using the
Set app variableor
Set page variableflow functions, depending on which one you chose. In your flow function, set the binding type of
Assigned valueto be a formula, and then set the formula's value to be
outputs["On file upload progress"].event.
pageVars.uploadEvent.bytesUploadedcan cause Composer to complain about mismatching schema, even though the actual data is correct.
Contentfield to a formula function and setting the formula function to be
bytesUploadedand divide it by the
totalSizeof the files that you are uploading, and then you multiply that by 100, and you get a 0-100 number that represents the percentages of files uploaded.
ROUND(NUMBER(pageVars.yourVarName.bytesUploaded) / NUMBER(pageVars.yourVarName.totalSize) * 100)
Any value, the formula editor does not know what your variable has inside of it, so it can't automatically show you what fields your variable has inside of it, but you can always check the documentation!