BuddyDev

Obfuscate uploaded file names for MediaPress Uploads

Do you want to obfuscate/clean up the file names for the files uploaded via MediaPress? I got a few requests about it on the MediaPress plugin's blog post. Here is a small tip to do it.

We will be using UploadPlus plugin that already handles the file name cleanup/obfuscation very well.

Step 1:- Install UploadPlus plugin

UploadPlus is a free plugin available from WordPress.org Install uploadplus plugin from WordPress.org.

Link: https://wordpress.org/plugins/uploadplus/

Once you have installed it, Visit Dashboard->Settings->Media and you will see the UploadPlus plugin settings there like below.

upload-plus-settings

Make sure that you have ticked the "Random File Name". You can configure other options as you want.

Step 2:- Add MediaPress compatibility for UploadPlus.

Put this code in your bp-custom.php

That's all. Try uploading a new file and the file names will be obfuscated as per your UploadPlus settings.

Please make sure to upgrade MediaPress to the latest update from the github repo.  The above code needs 'mpp_upload_prefilter' filter which  I just added today.

Hope that helps 🙂

 

Comments are closed.