Last updated 29 May 2014. Created on 29 May 2014.
Edited by dman. Log in to edit this page.

If you are using Media module but need to use files that were not uploaded directly through the UI - such as :

  • Legacy upgrades
  • Embedded directly through WYSIWYG but not registered properly
  • Files uploaded by FTP or otherwise transferred in the background

You can add them to your media library by using the additional module media_bulk_upload form at /admin/content/file/import

Despite being in a module called upload, and a button called 'import', this can also run over files that are already in your files directory and just absorb them as file entities and have them show up in your media library.

Use the form to select the folder; as documented, it must be the absolute file path on your server, so you must know that, eg /var/www/drupal7/sites/default/files/imports.

The form does have a confirmation step that will let you check what will happen, and it will not move them or cause duplicates. As far as limited testing goes anyway.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

brad.bulger’s picture

The form does have a confirmation step that will let you check what will happen, and it will not move them or cause duplicates

That's not true, for media_bulk_upload 7.x-2.0-alpha4 at least. It copies the scanned files into the root of your public files directory.

see #2276061: Stop creating duplicates during "bulk upload"

ambereyes’s picture

If you re-save the file, it will identify the file type. In case you have a lot of legacy files, just write a quick module that invokes the node_save function for files in a specific directory. There is probably a simpler way to save all, maybe use the VBO node save function in a view. Either way, it works.