Add possibility to generate video thumbnails to other file system

Created on 15 June 2022, over 2 years ago
Updated 14 November 2023, about 1 year ago

Problem/Motivation

Right now, in ProviderPluginBase it is hardcoded to public:
protected $thumbsDirectory = 'public://video_thumbnails';

If someone uses AWS S3 or Google Cloud Storage for the images and files, let them somehow set to s3://video_thumbnails or gcs://video_thumbnails.

Steps to reproduce

Proposed resolution

Make it alterable via config.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia kaszarobert

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada bbombachini London, ON

    This is great idea and it works, but I'm moving this to "Needs work" because we need a config form and be able to import/export config as well as reflect this change on schema.

  • πŸ‡ΊπŸ‡ΈUnited States joshf

    I took a different approach for this. Instead of a configuration form, I opted to use the default file scheme as suggested by Damien in the D7 version of this issue. β†’ . This works great for us with our s3 setup, but there is one weird caveat.

    In 2715669 β†’ , the thumbnail URL was changed to relative to keep content portable between hosts. Unfortunately this doesn't work with s3 because the normal operation is that the image is on a different host from Drupal. I've tried to work around this by first checking if the hostname of the preview image is the same as the Drupal hostname. If it is, the existing behavior is retained and the image is output as relative. If the hostnames differ, the full path including original host is used.

    The only time I can see this being an issue is if someone is staging their content on a server that uses a different s3 server than production, which sounds super complicated. In that situation, preview images are already broken, so this doesn't break anything new but does fix s3 preview images for those of us who aren't staging their content.

    I'm leaving #2's patch visible since it's a completely different way of going about it that might work better for some.

  • πŸ‡ΊπŸ‡ΈUnited States joshf
  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States joshf
Production build 0.71.5 2024