How can I save the original filename to the database?
How about saving the original filename inside the current $_REQUEST and processing it whenever WordPress generates the attachment metadata: /** * Store original attachment filename in the current $_REQUEST superglobal * * @param NULL * @param Array $file – Uploaded File Information * * @return NULL */ function wpse342438_store_attachment_filename( $null, $file ) { $_REQUEST[‘original_filename’] = … Read more