• Resolved wolftex

    (@wolftex)


    Can’t find out why I cannot get anything but a ‘?’ for ‘action’ on Dropbox mp3 files.
    I set settings to ‘host them extern’ but still no luck. Is there a special recipe to be able to access these via Add External Files?

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author threadi

    (@threadi)

    Hello,

    Thanks for your question and your interest in my plugin 🙂

    MP3 files are not automatically supported by the plugin, nor are they currently available in the settings. To import MP3 files, you need to perform the following steps once:

    1. Add the following PHP code to your project to include MP3s as an available file type (e.g., in your child theme or via a code snippets plugin):
      add_filter( 'efml_supported_mime_types', function( $list ) {
      $list['audio/mpeg'] = array(
      'label' => 'MP3',
      'ext' => 'mp3'
      );
      return $list;
      } );
      1. Then, go to Settings > External Files in Media Library > General Settings. At the very top, you will find the settings for allowed file types in your project to import. Select the newly added MP3 option there. Save, and you’re done.

      You can now import MP3 files 🙂 By the way, the general procedure for cases like this is also documented here: https://github.com/threadi/external-files-in-media-library/blob/master/docs/MimeTypes.md

      I plan to add MP3 files to the list in a future update so that the PHP code will no longer be necessary.

      Thread Starter wolftex

      (@wolftex)

      Thanks for the immediate response, as always !

      This sounds easy enough and I tried both methods, but alas, no change to the list of file types.

      Plugin Author threadi

      (@threadi)

      These aren’t two methods – they’re a single process. You have to complete step 1 first, and then step 2. You can’t do step 2 without completing step 1.

      It’s also important where you’ve stored the PHP code. Where is it?

      Thread Starter wolftex

      (@wolftex)

      You said, “in your child theme or via a code snippets plugin”.

      I dropped the code in functions.php with the child theme file editor and as this didn’t seem to work, used the Code Snippets plugin to add this snippet and set it active.

      Thread Starter wolftex

      (@wolftex)

      oops, found it… wasn’t in file types but under meme-types. It’s of course working now. Thank you!

    Viewing 5 replies - 1 through 5 (of 5 total)

    You must be logged in to reply to this topic.