# Is There A Way To Tell What Kind Of File

**URL:** <https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391>\
**Category:** Ask for Help\
**Created:** [December 5, 2024, 5:45pm UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391 "2024-12-05T17:45:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)\
**Post date:** [December 5, 2024, 5:45pm UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/1 "2024-12-05T17:45:40Z")

</div>

I Need Help, Ive Got A Multiple Files Column Setup And When Clients Upload Files, I have No Way Of Determining What Type Of File It Is And Im Curious To Find Out If Anyone Knows A Way To Find Out What Type A File Is After Its Been Uploaded?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 5, 2024, 5:58pm UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/2 "2024-12-05T17:58:33Z")

</div>

What if a user uploads multiple different types of files into the same column? What would you expect to see? Something like this? `txt,html,png`

---

<div class="post-metadata">

**Author:** ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)\
**Post date:** [December 5, 2024, 6:35pm UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/3 "2024-12-05T18:35:41Z")

</div>

Yes Im Setting Up A Webhook Through Make To [PDF.co](http://PDF.co)

To Convert Csv And Excel Files To PDF, but Cant Distinguish between Them.

Better Yet, Is There A Way To Seperate File Type After Theyve Been Uploaded?

---

<div class="post-metadata">

**Author:** ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)\
**Post date:** [December 5, 2024, 6:40pm UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/4 "2024-12-05T18:40:54Z")

</div>

Figured It Out, created If Then Else Column To See If URL Includes

pdf  
jpg  
csv

this should allow me to choose which files get sent to get converted

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 5, 2024, 6:45pm UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/5 "2024-12-05T18:45:37Z")

</div>

Well, I had done this much, so in case you need it, here is javascript that will read through the urls and return a comma delimited list of unique file extensions.

All you need is a Joined List column to convert the Multiple Files column array into a comma delimited list of urls. Then a javascript column with the following code, passing the joined list as the p1 parameter. This will return a unique list of file extensions.

```auto
function extractUniqueFileExtensions(urls) {
    if (!urls) return ""; // Handle empty input

    return Array.from(
        new Set( // Use a Set to ensure uniqueness
            urls
                .split(",") // Split the URLs into an array
                .map(url => {
                    const match = url.trim().match(/\.([a-zA-Z0-9]+)(?=\?|#|$)/); // Regex to capture the file extension
                    return match ? match[1] : ""; // Extract extension or return an empty string if not found
                })
                .filter(ext => ext) // Remove empty strings
        )
    ).join(","); // Join the unique extensions into a comma-delimited list
}

return extractUniqueFileExtensions(p1);

```

---

<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:** [December 6, 2024, 1:06am UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/6 "2024-12-06T01:06:32Z")

</div>

Are you processing them all at once in [PDF.co](http://PDF.co)?

I assume you can iterate through an array in Make, and then just process those that are CSV and Excel?

---

<div class="post-metadata">

**Author:** ![Dustinrt](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Dustinrt](https://community.glideapps.com/u/Dustinrt)\
**Post date:** [December 6, 2024, 2:35am UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/7 "2024-12-06T02:35:42Z")

</div>

[PDF.co](http://PDF.co) allows you to send an array of links containing the pdfs

Like the links after files have been uploaded to glide

It downloads and creates a new pdf

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [December 13, 2024, 2:36am UTC](https://community.glideapps.com/t/is-there-a-way-to-tell-what-kind-of-file/78391/8 "2024-12-13T02:36:13Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
