# File picker not working

**URL:** <https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964>\
**Category:** UXP Plugin API\
**Tags:** react\
**Created:** [March 2, 2023, 8:51pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964 "2023-03-02T20:51:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawn](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/shawn/32/258_2.png) [@shawn](https://forums.creativeclouddeveloper.com/u/shawn)\
**Post date:** [March 2, 2023, 8:51pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/1 "2023-03-02T20:51:15Z")

</div>

I’m simply trying to open a file picker in Photoshop. This used to be simple pre UXP (rant). I used the react-starter from the dev console. My code isn’t opening a file picker.

```auto
 const handleGetFiles = async () => {
        const files = await storage.localFileSystem.getFileForOpening({allowMultiple: true, types: fileTypes.images});
        if (files.length === 0) {
            console.log('no files selected');
        }

        console.log('files: ', files);
    }

```

---

<div class="post-metadata">

**Author:** ![tomzag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/tomzag/32/2464_2.png) [@tomzag](https://forums.creativeclouddeveloper.com/u/tomzag)\
**Post date:** [March 2, 2023, 9:13pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/2 "2023-03-02T21:13:19Z")

</div>

Are you importing `storage` and `fileTypes` correctly?  
Try wrapping the code in a `try catch` block and check if an error is thrown.

---

<div class="post-metadata">

**Author:** ![shawn](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/shawn/32/258_2.png) [@shawn](https://forums.creativeclouddeveloper.com/u/shawn)\
**Post date:** [March 2, 2023, 9:23pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/3 "2023-03-02T21:23:01Z")

</div>

I’m importing like this… `require('uxp').storage.localFileSystem`

---

<div class="post-metadata">

**Author:** ![shawn](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/shawn/32/258_2.png) [@shawn](https://forums.creativeclouddeveloper.com/u/shawn)\
**Post date:** [March 2, 2023, 9:26pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/4 "2023-03-02T21:26:06Z")

</div>

Can you point me to the documentation?

---

<div class="post-metadata">

**Author:** ![tomzag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/tomzag/32/2464_2.png) [@tomzag](https://forums.creativeclouddeveloper.com/u/tomzag)\
**Post date:** [March 2, 2023, 9:31pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/5 "2023-03-02T21:31:14Z")

</div>

```auto
const fs = require('uxp').storage.localFileSystem;
const fileTypes = require('uxp').storage.fileTypes;

const handleGetFiles = async () => {
        const files = await fs.getFileForOpening({allowMultiple: true, types: fileTypes.images});
        if (files.length === 0) {
            console.log('no files selected');
        }
        console.log('files: ', files);
    }

```

Written off the top of my head, but should work. Of course, the handleGetFiles() function needs to be called.

---

<div class="post-metadata">

**Author:** ![shawn](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/shawn/32/258_2.png) [@shawn](https://forums.creativeclouddeveloper.com/u/shawn)\
**Post date:** [March 2, 2023, 9:37pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/6 "2023-03-02T21:37:55Z")

</div>

I’m using your code example and the handleGetFiles function is being called… Still not opening a file picker window.

I’ve unloaded the plugin and reloaded.

---

<div class="post-metadata">

**Author:** ![tomzag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/tomzag/32/2464_2.png) [@tomzag](https://forums.creativeclouddeveloper.com/u/tomzag)\
**Post date:** [March 2, 2023, 9:59pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/7 "2023-03-02T21:59:57Z")

</div>

Tested the code and it works. Probably your problem is somewhere else …

---

<div class="post-metadata">

**Author:** ![shawn](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/shawn/32/258_2.png) [@shawn](https://forums.creativeclouddeveloper.com/u/shawn)\
**Post date:** [March 2, 2023, 10:31pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/8 "2023-03-02T22:31:17Z")

</div>

The manifest needed to be updated to include this line:

```auto
"localFileSystem": "fullAccess",

```

---

<div class="post-metadata">

**Author:** ![tomzag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/tomzag/32/2464_2.png) [@tomzag](https://forums.creativeclouddeveloper.com/u/tomzag)\
**Post date:** [March 3, 2023, 8:10am UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/9 "2023-03-03T08:10:37Z")

</div>

It needs to be mentioned that this is only required for a manifest version \>= 5.  
And I think for this operation `"localFileSystem": "request"` is sufficient.

Documentation: [https://developer.adobe.com/photoshop/uxp/2022/guides/uxp\_guide/uxp-misc/manifest-v5/#local-filesystem](https://developer.adobe.com/photoshop/uxp/2022/guides/uxp_guide/uxp-misc/manifest-v5/#local-filesystem)

---

<div class="post-metadata">

**Author:** ![Maher](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/maher/32/1432_2.png) [@Maher](https://forums.creativeclouddeveloper.com/u/Maher)\
**Post date:** [March 3, 2023, 9:25am UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/10 "2023-03-03T09:25:04Z")

</div>

it is enough for file/folder pickers  
however full access is required for `getEntryWithUrl` (no user interaction!) and `require('fs')` operations

---

<div class="post-metadata">

**Author:** ![sefmccullough](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/sefmccullough/32/2647_2.png) [@sefmccullough](https://forums.creativeclouddeveloper.com/u/sefmccullough)\
**Post date:** [May 1, 2024, 8:02pm UTC](https://forums.creativeclouddeveloper.com/t/file-picker-not-working/5964/11 "2024-05-01T20:02:52Z")

</div>

Anyone finding this thread 2024 and later, please check the updated permissions documentation:  
[https://developer.adobe.com/photoshop/uxp/2022/guides/uxp\_guide/uxp-misc/manifest-v5/#plugin-permissions](https://developer.adobe.com/photoshop/uxp/2022/guides/uxp_guide/uxp-misc/manifest-v5/#plugin-permissions)
