# File upload component not working with single file?

**URL:** <https://community.weweb.io/t/file-upload-component-not-working-with-single-file/21421>\
**Category:** Ask us anything\
**Created:** [July 16, 2026, 5:02pm UTC](https://community.weweb.io/t/file-upload-component-not-working-with-single-file/21421 "2026-07-16T17:02:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericp](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@ericp](https://community.weweb.io/u/ericp)\
**Post date:** [July 16, 2026, 5:02pm UTC](https://community.weweb.io/t/file-upload-component-not-working-with-single-file/21421/1 "2026-07-16T17:02:23Z")

</div>

Has anyone encountered the file upload component not working when using the configuration to only allow single files?

The file data could not bind to the next action no matter what I did.

The only workaround was to set to multiple, but then set max to 1 and then bind the array value at index 0 for the next action in the workflow.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [July 17, 2026, 10:05am UTC](https://community.weweb.io/t/file-upload-component-not-working-with-single-file/21421/2 "2026-07-17T10:05:23Z")

</div>

Hi @ericp 👋

If you are in preview mode, upload a file, and open the debug panel, you should see the file upload variable updated:

 ![CleanShot 2026-07-17 at 11.52.13@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/f/d/fd348a1cf7dcb36ee2b53e3b418d7268846f22c0.png)

You should then be able to see the file object and bind it in the context of the workflow:

 ![CleanShot 2026-07-17 at 12.01.46@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/3/e/3ed9388c978e53f6a3c0157364970828d5719c49.png)

The value of the file upload is always an array. If you’re working with multiple files, you’ll want to loop through the array and bind to the file inside the loop as described [here](https://docs.weweb.io/elements/file-upload.html#storing-uploads) but if you’re working with a single file upload, you can bind directly to the file object like I did above.

Does that clarify things a little bit? Don’t hesitate to let me know if not.
