Forums
Home / Plugin: Import any XML or CSV File to WordPress / Set imported images in uploads folder to correct permissions
(@handiworknyc)
1 year, 3 months ago
The plugin needs to be fixed to set image permissions after import.
`</p> <p>function chmod_r($path) {<br>$dir = new DirectoryIterator($path);<br>foreach ($dir as $item) {<br>chmod($item->getPathname(), 0755);<br>if ($item->isDir() && !$item->isDot()) {<br>chmod_r($item->getPathname());<br>}<br>}<br>}</p> <p>$uploads = wp_get_upload_dir()[‘path’];</p> <p>chmod_r($uploads);</p> <p>`
(@wpallimport)
Hi @handiworknyc,
I tested by importing some images and manually uploading others, and they all ended up with the correct permissions.
Can you elaborate on what’s happening on your site and provide instructions on how we can replicate it?