Read remote upload folder with nginx

Hi, with apache i can read remote uploads using:

# Locate in wp-content/uploads 

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /wp-content/uploads/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*) http://remotedomain.tld/wp-content/uploads/$1 [L,P]
</IfModule>

With nginx, should be:

# nginx configuration

location /wp-content/uploads/ {
  if (!-e $request_filename){
    rewrite ^/wp-content/uploads/(.*) http://remotedomain.tld/wp-content/uploads/$1 redirect;
  }
}

It’s that correct? Where should I put the file knowing nginx does not allow put file in website specifics folders.?

Thanks in advance.