User tests: Successful: Unsuccessful:
Pull Request for Issue #19954
Media field does not allow to select files that are not images (PDF, ...)
Changes in plugins/fields/media/tmpl/media.php
Code Inspection
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
media = images
https://docs.joomla.org/Media_form_field_type
Code works as expected on Joomla! 4.0.0-alpha8-dev: https://gridx.joomla.com/
In my opinion media types refer to file, image, audio, video as well as the next practice.
Improvement for future reference in plugins/fields/media/params/media.xml
20: JNO could be extended for more clarity:
Also other extensions like .doc might be added with:
if((substr($path, -4) == '.pdf') || (substr($path, -4) == '.doc'))
(uploading works from backend).
Thanks
I think the field type you're looking for to select non-images is: filelist
https://docs.joomla.org/Filelist_form_field_type
Within its options, one can filter by extension using regex - PDF, for example.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-10-08 02:00:54 |
Closed_By | ⇒ | Quy |
Closing as not proper fix.
@martyharty please test