Follow

has AnonymizeFilename filter. Does anyone use it with Local uploader?
It doesn't seem to work for me. It updates the "name" field of "upload" struct, but that field is only used twice in the code: together with "id" it's assigned to "path" field, but that is done BEFORE upload filters are applied and later to fill the description field, which I don't care about.
As "path" field gets assigned before even running that filter, that is what is used to store the file in the file system.

Thus the uploaded file retains its original name 🤷
There's also the Dedupe filter — it updates the "path" field and doesn't care about "name" so it works.
Ironically, the only thing that checks the "name" field are tests, so from test's perspective the filter works just fine, neither the file name in the real file system, not the resulting URL are checked 😂

Show thread
Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml