For a content type "TEST" which has a field "upload file", I want the file path before saving the node. hook_node_presave can be used to do anything before saving the node. I want to rename the file before it get saved into database.
but my file is getting saved first into the database.
How to do rename a file before it gets saved into database in a custom module.