Receive event
logic node to the logic canvas, then select Advanced custom event
from 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 event
logic 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 value
type 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 event
node, by using the Set app variable
or Set page variable
flow functions, depending on which one you chose.
In your flow function, set the binding type of Assigned value
to be a formula, and then set the formula's value to be outputs["On file upload progress"].event
. pageVars.uploadEvent.bytesUploaded
can cause Composer to complain about mismatching schema, even though the actual data is correct.Content
field to a formula function and setting the formula function to be ENCODE_JSON(pageVars.yourVarName)
.bytesUploaded
and divide it by the totalSize
of 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!