Perspective File Upload Component - Expected Behavior for multiple file uploads

I would like to confirm what is the expected behavior when using the perspective file upload component to handle multiple files. With the scripts below it seems that only one file every ends up in the holding variable even if I have drug multiple files in to upload.

Do I need to be appending to the data holder when handling more than one file?

The event script on the component file received event

filename = event.file.name
filedata = event.file.getBytes()
	
self.view.custom.fileName = filename
self.view.custom.filedata = filedata

The files are temporarily held in a view custom property

Thanks,

Nick

You are setting the holding variables to filename / filedata. Make them an array and then append to them.

@jpark thanks for the quick reply.

By changing the destination parameter type to array it behaves as expected:

Thanks,

Nick

@jpark with the additional qualifier that if array types have been set, the clear action should be like below, not “None” otherwise an error happens when trying to append the first record to a “None” type:

self.custom.fileName = []
self.custom.filedata = []

Thanks again,

Nick