New answers tagged

0

I have had this several times, either because I have left a kint function uncommented(seems to cause Ajax to fail to display derivatives), or one of my custom modules(or settings.php) has a blank line before the opening php tag. Worth checking.


3

First, there is a core issue to eventually get this into core. Now, the best way is to use the Entity Usage module, which can handle tracking of media and many other cases. Hats off to the module maintainers-- this is all I needed to do to implement my use case: Download the module with composer. Enable the module. Go to /admin/config/entity-usage/...


1

Use the Media Entity File Replace module. This is the exact use case it was created for.


0

Having tried multiple owner change commands and permissions did not work. The solution was simply : sudo a2enmod rewrite systemctl restart apache2


0

The default_value attribute accept an array in case of managed_file: $form['my_file'] = [ '#type' => 'managed_file', '#title' => 'my file', '#name' => 'my_custom_file', '#description' => $this->t('my file description'), '#default_value' => [$config->get('my_file')], '#upload_location' => 'public:/...


0

Try to use the Simple Image Rotate module.


0

For files uploaded into the private:// directory, you can restrict access via permissions. Also, take a look for the Protected File (from download) module.


0

As I understand, you want to search by Media entities/records. If you use the standard Search module from Core, then it impossible. But you can install the Search API module, configure the search server (search server can use current drupal Database or Apache Solr, or smth other). In the Search API you can create indexes and include the documents into the ...


4

Create a subtheme if you haven't already. Find the file core/modules/file/templates/file-audio.html.twig and copy it to your subtheme's templates directory. Edit the following line in the file. Original line: <audio {{ attributes }}> Change it to this: <audio {{ attributes }} controlsList="nodownload">


0

1 Read an image in JS from attached file https://developer.mozilla.org/ru/docs/Web/API/URL/createObjectURL 2 Use Lib for reading Exif data from jpg for autorotation as default option https://github.com/exif-js/exif-js 3 Create controls for manual rotate image on canvas as manual tool https://stackoverflow.com/questions/17411991/html5-canvas-rotate-image 4 ...


0

to display the raw url of a remote video : {{ content.field_media_oembed_video.0 }}


Top 50 recent answers are included