Change upload directory

Hi

I understand that the photos of the contacts and leads are saved in the upload folder, now I want to save the photos on a remote server, is it possible to do it?

The CRM machine and the server of the photos have operating system red hat.