Support for batch migration, e.g. after Migration / join efforts with migrate_file_to_media

Created on 29 April 2021, almost 4 years ago
Updated 24 March 2025, 12 days ago

Problem/Motivation

When migrating projects to Drupal 8/9 in many cases you have to deal with files that were not Media (in core) files before. This is for example the case when migrating Drupal 6 or Drupal 7 websites to Drupal 8/9, but may also happen for older Drupal 8 projects which had Media contrib or no media at all.

Batch file to media / Drush / Migrate functionality?

As you are providing a clever and handy manual solution, what about batch / mass migration to media?

Join forces with migrate_file_to_media?

Would it make sense to use the logics from this module to provide batch migration in ui and drush? Or should https://www.drupal.org/project/migrate_file_to_media β†’ be used?

I guess both modules will be quite similar in large parts of the file to media code and might help each other to fix all kinds of issues and features for that.

What do you think about that? Are both modules required? Would it make sense to combine both or join forces?

✨ Feature request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

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.

  • πŸ‡ΈπŸ‡ͺSweden Jochen Wendebaum

    I assume that nothing has been done to "bulk"ify this? I have several hundreds of sound files as files which I have to move over to "media"...

  • πŸ‡©πŸ‡ͺGermany tfranz

    Hi Jochen,
    attached my little module – i hope it still works and it will help you …

    1. Backup your database … ;-)
    2. Enable the module custom_files_to_media
    3. Visit the page /admin/config/media/files-to-media …
    4. … and it should convert every file to a media file – without any further warning.

    User of the media-file will be the current user – can be changed in line 27 of the file /src/Controller/FilesToMediaController.php
    There is no batch-processing – i don't know if it will work for hundreds of images …

    Nowadays i would prefer to solve this problem with the sandbox batch functionality in hook_update_N.

Production build 0.71.5 2024