Feature-84250-SeparatelyEnableDisableAddMediaByURLAndSelectUploadFiles.rst 1.13 KB
Newer Older
1
2
.. include:: ../../Includes.txt

3
============================================================================================
4
Feature: #84250 - Separately enable / disable "Add media by URL" and "Select & upload files"
5
============================================================================================
6
7
8
9
10
11
12
13

See :issue:`84250`

Description
===========

A new appearance property "fileByUrlAllowed" is used to separately enable / disable the buttons "Add media by URL" and "Select & upload files".

14
15
*  :php:`fileUploadAllowed = false` now only hides the button "Select & upload files".
*  :php:`fileByUrlAllowed = false` now hides the button "Add media by URL".
16
17
18
19
20

If "elementBrowserType" is set to "file" both values are true by default.

Example

21
.. code-block:: php
22
23

   $GLOBALS['TCA']['pages']['columns']['media']['config']['appearance'] = [
24
25
26
      'fileUploadAllowed' => false,
      'fileByUrlAllowed' => false,
   ];
27
28
29
30
31
32
33
34

This will suppress both buttons and only leave "Create new relation".

Impact
======

Users have to use the new appearance property "fileByUrlAllowed" to hide the button "Add media by URL"

35
.. index:: Backend, TCA, ext:backend