I am currently hashing filenames using a beforeOperation hook in order to rewrite the filename during upload. This ensures files stored in S3 don't retain their original filename, and their URLs reflect this.
However one side effect is the labelling of the file within Payload CMS. As part of the hook, I capture the original filename and store it in a field on the document, and can use this as the title in the collection's List view, but the Upload field component always displays the filename.
Does anyone have any suggestions for how to have hashed filenames, but also ensure a good editing experience? Would be great if the Upload field had an admin.filenameField that let you specify a field to override, but maybe there's a simpler solution I'm not seeing.
Thanks!