Skip to main content

I don't like

  • fluent changing the filename after upload

Raiyan Marzan

Han VanΒ A hook is available to customize the filename: fluent_community/generated_upload_file_name
As for old uploaded files, they are automatically deleted within 1–2 hours.

Raiyan MarzanΒ This is not the case when your community is connected to bunny storage. How can this be implemented?

Han Van

Raiyan MarzanΒ how to implement the hook?

Han Van

Raiyan MarzanΒ the automatic removal works!

Han Van

Raiyan MarzanΒ i added this code to the functions.php to keep FC from changing my filenames. nothing happens. what am i doing wrong?

add_filter('fluent_community/generated_upload_file_name', function ($file, $originalName, $file_3) {
return $file;
}, 10, 3);

Raiyan Marzan

Han VanΒ Here, the first parameter is the actual name after the prefix is applied. If you want to keep the original name, simply return $originalName -

add_filter('fluent_community/generated_upload_file_name', function ($fileName, $originalName, $file) {
    return $originalName;
}, 10, 3);

Han Van

Raiyan MarzanΒ thank you, works!

i am not sure if it is correct on the FC dev site