I am not able to get file uploads of any type to work on my Drupal instance when I attempt to add media using the built in form. When I upload an image file, I get:
And looking at the log messages in Drupal I see:
The upload directory ://2022-05 for the file field field_media_image_private could not be created or is not accessible. A newly uploaded file could not be saved in this directory as a consequence, and the upload was canceled.
I do not understand where the path :// comes from. I would have expected it to be something like public:// or private:// but not just ://.
A few things I tried with no success (for test purposes):
- Setting relative instead of absolute paths for files and private folders in settings.php.
- Setting 777 permissions on the files and private folders.
- Disabling every module except core and rebuilding all caches.
What else could be the source of this issue? What else can I check?
$settings['file_public_path']
value in settings.php$settings['file_public_path'] = 'sites/default/files';