[Feature Request] Randomize the Filename for Uploads

[ad_1]

Hello,

I am a happy Pro user and would love it if ASE had a feature for “changing” the original filename on file upload. Currently, I am using my own solution, but I think it would be a great feature for ASE Pro.

add_filter('wp_unique_filename', function($filename, $ext) {
    $uniqueName = bin2hex(random_bytes(16));
    $filename = $uniqueName . $ext;
    return $filename;
}, 10, 2);

Thank you for your awesome work <3

  • This topic was modified 23 minutes ago by Pixelbart.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer