Control file uploads

Hellow
How can I control the uploading of attachments?
For example, I want when I upload an attachment to purchase invoices, it is stored in a folder called Invoices Folder not in home folder