In some occasions may be necessary that file uploads URL points to somewhere else different of standard place. This can be done by using the option
To change the path http://example.com/wp-content/uploads and let it like http://static.example.com/wp-content/uploads, the option
upload_url_path should be set like below.
update_option( 'upload_url_path', 'http://static.example.com/wp-content/uploads' );