I have a local Drupal instance (drupal4). Updated settings.php file

global $content_directories;
$content_directories['sync'] = $app_root.'/content/sync';
(My code is directly in D://xampp/htdocs/drupal4)

But getting this error

The directory D:\xampp\htdocs\drupal4/content/sync is not writable.

Also images are not moving when tried with Drupal UI (Image attached). The yml for file is created but image is not moved.
Tried Drush command "drush cse --entity-types=file" for exporting the image but after importing this archive the image is still not rendering.

Comments

abhay.agarwal created an issue. See original summary.

abhay.agarwal’s picture

Title: The content directory is not writable. Files are not moved via module UI or Drush command either » The content directory is not writable. Files are not moved via UI Single Export or Drush command either
blanca.esqueda’s picture

Title: The content directory is not writable. Files are not moved via UI Single Export or Drush command either » UI Single Export/Import of files
Version: 3.0.0-beta1 » 4.0.x-dev
Component: Code » Export/Import
Priority: Major » Normal

You have to make sure that the folder in this path $app_root.'/content/sync' is writable.
When adding it on setting.php, you have to create it and make it writable.

About the files, there is a drush option that handle how the file is exported.
https://www.drupal.org/docs/8/modules/content-synchronization/drush-comm...

--files
A value option to export media/files.
Values: none, base64, folder

none: means not file is moved, only the content configuration yml file
base64: put the data of the file on the yml file so it can be imported
folder: move the file to the content/config folder

example:
ddev drush content-sync:export --entity-types=file --files=base64

--------

I'm updating the title of this Issue, to reflect that the UI of exporting/importing a file needs to have the options that drush have.

blanca.esqueda’s picture

Status: Active » Closed (duplicate)