In Drupal 8 I have fields of type
Image, inside Content types and forms. These fields stores files inside the "public" folder.
When I upload files with a name containing spaces, for example a file named
"example with spaces.pdf", the file is correctly uploaded but once uploaded it is no more available.
The image below is just after uploaded an image containing spaces in the filename. Note that all seems correct:
When I save and publish the content I get this:
And returning back in the edit panel the thumbnail is no more available:
Same problem above trying to upload files inside a field of type
The file's url becomes something like this:
But I'm redirected to the home page trying to open such url. Maybe there is a bug in Drupal when translates the url encoded filename in the real one.
If the filename has no spaces, or if the file is uploaded inside the "private" folder, there are no problems.
Any idea about how to solve this problem?
I can reproduce the error with following steps:
$ drush pm-download drupal --drupal-project-rename=drupal
$ cd drupal $ drush site-install standard \ --db-url='mysql://[db-user]:[db-pass]@localhost:[db-port]/drupal' \ --account-name=admin --account-pass=password \ --site-name="Drupal" \ --firstname.lastname@example.org
$ drush runserver
Create a new 'Article' and upload an image with spaces.
Maybe is there something wrong in steps above? Or a bug in the drush's built-in server?