# Perspective File Upload Component - Expected Behavior for multiple file uploads

**URL:** <https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557>\
**Category:** Ignition\
**Created:** [September 2, 2021, 3:38pm UTC](https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557 "2021-09-02T15:38:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [September 2, 2021, 3:38pm UTC](https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557/1 "2021-09-02T15:38:36Z")

</div>

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**

```auto
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**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8f31be714f535b05a5b46d527074843c0888cbaa.png)

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [September 2, 2021, 3:46pm UTC](https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557/2 "2021-09-02T15:46:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [September 2, 2021, 3:53pm UTC](https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557/3 "2021-09-02T15:53:45Z")

</div>

@jpark thanks for the quick reply.

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/da71477ae13bc905b4e016ae32dd900a31864260.png)

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [September 2, 2021, 4:41pm UTC](https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557/4 "2021-09-02T16:41:56Z")

</div>

@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:

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

```

Thanks again,

Nick

---

<div class="post-metadata">

**Author:** ![ecurreaux](https://avatars.discourse-cdn.com/v4/letter/e/db5fbb/32.png) [@ecurreaux](https://forum.inductiveautomation.com/u/ecurreaux)\
**Post date:** [October 24, 2025, 7:53am UTC](https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557/5 "2025-10-24T07:53:05Z")

</div>

Hello, I have exactly the same code, but when I want to download several files, only one file appears in the filename variable: ignition 8.1.48

filename is an Array

Manu

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 24, 2025, 9:59am UTC](https://forum.inductiveautomation.com/t/perspective-file-upload-component-expected-behavior-for-multiple-file-uploads/50557/6 "2025-10-24T09:59:51Z")

</div>

> [@ecurreaux](#):
>
> but when I want to download several files

This thread is about **upload**. Start a new thread (and delete the post above).

Welcome to the forum!
