# Importing images from a folder to CMS gallery

**URL:** <https://community.bloomreach.com/t/importing-images-from-a-folder-to-cms-gallery/1340>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [August 13, 2019, 12:55pm UTC](https://community.bloomreach.com/t/importing-images-from-a-folder-to-cms-gallery/1340 "2019-08-13T12:55:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sriram.muralidharan](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/sriram.muralidharan/32/481_2.png) [@sriram.muralidharan](https://community.bloomreach.com/u/sriram.muralidharan)\
**Post date:** [August 13, 2019, 12:55pm UTC](https://community.bloomreach.com/t/importing-images-from-a-folder-to-cms-gallery/1340/1 "2019-08-13T12:55:33Z")

</div>

Hi,

I am working on a migration project from Wordpress to Bloomreach. We have given a zip of files that are to e uloaded to our Bloomreach CMS. I tried this using the import Groovy scripts provided here

> <https://github.com/bloomreach-forge/content-export-import/blob/develop/updater-examples/src/main/resources/hcm-config/configuration/update/registry/example-import-image-files.groovy>

I have some 10 images and needs, but when I execute the groovy , I get the below error on the console.

INFO 2019-08-13 16:21:28 Executing updater Example\_Import\_Image\_Files  
INFO 2019-08-13 16:21:29 Loading nodes to update  
INFO 2019-08-13 16:21:29 Finished loading 1 nodes to update  
DEBUG 2019-08-13 16:21:30 Imported binary from ‘/Bloomreach/Workspace/XXXXXXXX/repository-data/webfiles/src/main/resources/site/images/570677\_1000\_1\_800.jpg’ to ‘/content/gallery/contenteximdemo/imported/570677\_1000\_1\_800.jpg’.  
ERROR 2019-08-13 16:21:30 Updating / failed - org.apache.commons.vfs2.FileSystemException: Could not delete “file:///E:/Bloomreach/Workspace/hobby-craft-bloomreach/target/tomcat9x/temp/570677\_1000\_1\_800.jpg2352403427252067044.jpg”.  
INFO 2019-08-13 16:21:30

## =============================================================================================================== Execution Summary:

## Total: 2, Processed: 1, Suceeded: 1, Failed: 0, Duration: 1788ms

## Details (in CSV format):

# SEQ,PROCESSED,SUCCEEDED,ID,PATH,TYPE,ATTRIBUTES,ERROR 1,false,false,/content/gallery/contenteximdemo/imported/530x300\_Sewing1.webp,{file=/Bloomreach/Workspace/XXXXXXX/repository-data/webfiles/src/main/resources/site/images/530x300\_Sewing1.webp}, 2,true,true,9c568f1a-1439-4ad3-b728-1513624f6c86,/content/gallery/contenteximdemo/imported/570677\_1000\_1\_800.jpg,hippogallery:imageset,{file=/Bloomreach/WorkspaceXXXXXXX/repository-data/webfiles/src/main/resources/site/images/570677\_1000\_1\_800.jpg},

Why this deletion is happening and it stops. I just saw only one image on the gallery as the job stopped. Could someone help me here please ?

---

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [August 13, 2019, 1:37pm UTC](https://community.bloomreach.com/t/importing-images-from-a-folder-to-cms-gallery/1340/2 "2019-08-13T13:37:15Z")

</div>

Hi,

It creates image variants such as thumbnail image in the temporary folder from the given original image, and deletes the temporary image after creating image gallery nodes in JCR.  
For some reason, it seems failing to clean up the temporary files. Could you look into why it fails on that directory?

Regards,

Woonsan

---

<div class="post-metadata">

**Author:** ![sriram.muralidharan](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/sriram.muralidharan/32/481_2.png) [@sriram.muralidharan](https://community.bloomreach.com/u/sriram.muralidharan)\
**Post date:** [August 13, 2019, 1:41pm UTC](https://community.bloomreach.com/t/importing-images-from-a-folder-to-cms-gallery/1340/3 "2019-08-13T13:41:54Z")

</div>

Yes Understood, thumbnail image got created but it could not delete the temporary file.

How about the permission for this folder “target”, they should be ReadWrite ? I could see them as ReadOnly files and folders, hence it is not able to delete from the temp folder. I faced this error sometime before as well, when clickin on “Rebuild” option from the CMS while working on a demo project.

---

<div class="post-metadata">

**Author:** ![sriram.muralidharan](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/sriram.muralidharan/32/481_2.png) [@sriram.muralidharan](https://community.bloomreach.com/u/sriram.muralidharan)\
**Post date:** [September 9, 2019, 12:14pm UTC](https://community.bloomreach.com/t/importing-images-from-a-folder-to-cms-gallery/1340/4 "2019-09-09T12:14:58Z")

</div>

Thanks Woonson, I was able to work with this piece of information provided

> **[Gallery Asset Bulk Upload Plugin - BloomReach Experience - Open Source CMS](https://documentation.bloomreach.com/library/enterprise/services-features/bulk-upload/introduction.html)**
>
> Gallery Asset Bulk Upload Plugin
