# How to solve The file uses a storage provider that is read-only

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-solve-the-file-uses-a-storage-provider-that-is-read-only/5454>\
**Category:** UXP Plugin API\
**Tags:** javascript\
**Created:** [November 4, 2022, 1:45pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-solve-the-file-uses-a-storage-provider-that-is-read-only/5454 "2022-11-04T13:45:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xigao](https://avatars.discourse-cdn.com/v4/letter/x/c67d28/32.png) [@xigao](https://forums.creativeclouddeveloper.com/u/xigao)\
**Post date:** [November 4, 2022, 1:45pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-solve-the-file-uses-a-storage-provider-that-is-read-only/5454/1 "2022-11-04T13:45:26Z")

</div>

I want to rename an image, but I get the error:The file uses a storage provider that is read-only.  
Here is My code:

```auto
const fs = require("uxp").storage.localFileSystem;
const pluginFolder = await fs.getPluginFolder();
const psd = await pluginFolder.getEntry('test.psd');

const currentDocument = await app.open(psd);

await currentDocument.saveAs.jpg(psd,{ quality:12 },true)

const jpg = await pluginFolder.getEntry('test.jpg');

const img = await pluginFolder.getEntry('img');

console.log(jpg,img)
 
await jpg.moveTo(img,{newName:'11.jpg'})

```
