• Resolved Pixelbart

    (@pixelbart)


    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 6 months, 1 week ago by Pixelbart.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Bowo

    (@qriouslad)

    Great to hear you’re happy with ASE Pro. www.ads-software.com is strictly for supporting the free version, per it’s forum guidelines. So, I’ll assume this suggestion is for the free version.

    What is the use case for randomizing the filename?… Won’t that hurt SEO?

    Thread Starter Pixelbart

    (@pixelbart)

    @qriouslad

    Anonymization would be the solution. Several users in my team at work often upload files with names like “image-0001” or similar. Occasionally, files are named as “invoice-01234” or similar. This approach helps enhance file security by randomizing the filenames.

    It’s a security measure for me, making it more challenging to discern the file’s name.

    Thank you very much <3

    that belong in the free version along with a way to add prevent this from happening when replacing the media file. Or a way to black list certain files from being shown in the front end

    Plugin Author Bowo

    (@qriouslad)

    @pixelbart understood. However, this does not look like a common use case, i.e. not many people/users need this, so, probably best to keep it in a code snippet inside your child theme or a code snippets plugin. Thank you for the suggestion though.

    Thread Starter Pixelbart

    (@pixelbart)

    @qriouslad Well, it was more of a selfish thought, not a communal one. I made a little plugin for it and the issue is solved. Thank you for your time and the great plugin!

    • This reply was modified 6 months, 1 week ago by Pixelbart.
    Plugin Author Bowo

    (@qriouslad)

    @pixelbart my pleasure. Thanks for the suggestion and snippet. I hope others can also benefit from it by you sharing it here.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Feature Request] Randomize the Filename for Uploads’ is closed to new replies.