Problem/Motivation
docker-compose.yml
version: '3'
services:
drupal:
image: drupal
ports:
- 80:80
db:
image: mariadb
environment:
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: password
composer require drush/drush
composer require 'drupal/imce:^3.0'
drush en imce
http://localhost/admin/imce/browser
Uploaded aa.docx.
The following message is displayed and cannot upload.
The specified file aa.docx could not be uploaded.
Only files with the following extensions are allowed: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp.
I was able to upload aa.doc.
drush pmu imce
composer remove drupal/imce
composer require 'drupal/imce:3.0.9'
drush en imce
I can upload aa.docx
/admin/config/media/imce/admin?destination=/admin/config/media/imce
Allowed file extensions is *.
Drupal 10.1.7
PHP 8.2.14
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3411471-1538125.patch | 579 bytes | ytsuhako |
Comments
Comment #2
ytsuhako commentedI can upload if I type docx instead of asterisks in the allowed extensions.
Comment #3
j_s commentedI'm getting the same error with the asterisk meant to allow all file types on 3.0.10. Setting a specific list of file types does work at least.
Comment #4
ytsuhako commented/opt/drupal/web/modules/contrib/imce/src/Plugin/ImcePlugin/Upload.php
It worked when changed to the following.
I made this change because it is handled as follows in the core.
/opt/drupal/web/core/modules/file/src/Upload/FileUploadHandler.php
Comment #5
ytsuhako commentedComment #7
ufku commentedFixed in 3.0.11
Thanks for reporting.
Comment #8
ytsuhako commentedProblem solved for me.
Thanks a lot.
Comment #9
j_s commentedAll fixed for me! Thanks!
Comment #11
jeff.a commentedNot sure if this one is fixed... still have the issue after updating to 3.0.12 and core 10.2.7.
I am able to upload files when I put a wildcard (*) in the "Allowed file extensions" field, but I'm still getting the error when I limit to certain extensions.