Have it aimed to a PHP file
Than from there just use headers
header('Content-type: image/jpg');
header('Content-Disposition: attachment; filename="filename.jpg"');
readfile('filename.jpg');
Its a start you will need to modify it to gather the type of file, and its filename