# Validate file upload to create custom action

**URL:** https://community.glideapps.com/t/validate-file-upload-to-create-custom-action/57428
**Category:** Ask for Help
**Tags:** actions
**Created:** [February 2, 2023, 7:51pm UTC](https://community.glideapps.com/t/validate-file-upload-to-create-custom-action/57428 "2023-02-02T19:51:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Vexmo\_Technologies](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vexmo_technologies/32/53739_2.png) [@Vexmo\_Technologies](https://community.glideapps.com/u/Vexmo_Technologies)
#### Post date: [February 2, 2023, 7:51pm UTC](https://community.glideapps.com/t/validate-file-upload-to-create-custom-action/57428/1 "2023-02-02T19:51:48Z")

</div>

Hi, Is possible to create a custom file picker for accepting custom extensions, in this specific case, I need to evaluate an .xlxs and convert data to JSON, for saving it on firestore collection.

Some advise?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [February 2, 2023, 11:55pm UTC](https://community.glideapps.com/t/validate-file-upload-to-create-custom-action/57428/2 "2023-02-02T23:55:12Z")

</div>

So you need the ability to read an uploaded XLSX file and convert what you read to JSON?

---

<div class="post-metadata">

### Author: ![Vexmo\_Technologies](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vexmo_technologies/32/53739_2.png) [@Vexmo\_Technologies](https://community.glideapps.com/u/Vexmo_Technologies)
#### Post date: [February 3, 2023, 3:06am UTC](https://community.glideapps.com/t/validate-file-upload-to-create-custom-action/57428/3 "2023-02-03T03:06:09Z")

</div>

Yes, I try to get info from xlsx file and set as JSON. I think to find an answer. using the file upload button, but it allows to upload any file. First of all, I need to validate file type. I reach to get data as JSON using a lamda function, and implementing a call via webhook, but now I don’t know how to make for read the response data in glideapps from webhook ☹

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [February 3, 2023, 2:29pm UTC](https://community.glideapps.com/t/validate-file-upload-to-create-custom-action/57428/4 "2023-02-03T14:29:03Z")

</div>

For validating a file type, I would use a custom form.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

When users upload a file, you can extract the file type from the URL of the file using JavaScript. Then you can validate using the result of the JavaScript column.

For the JSON part, I’m not sure what you mean. What exact columns/flows are you using to parse the info from the file? Can you provide some screenshots or a video?
