Uploadcare Proxy

Uploadcare delivers your files with our CDN. It implies that you need to upload files to Uploadcare storage first. If you want to use our CDN features, like image processing, without explicitly uploading files to Uploadcare, this is the feature you want to use.

Proxy allows you to integrate Uploadcare with only minor URL modifications:

https://yoursite.ucr.io/ + https://yoursite.com/assets/image.jpg =
https://yoursite.ucr.io/https://yoursite.com/assets/image.jpg

It will upload files to your Uploadcare storage as soon as they’re requested. Once it gets copied to our CDN, all subsequent requests will fetch the file from the closest CDN node.

Features

You can proxy any file, but the main use case is to apply various image transformations.

This is the simplest way to implement responsive images, cut traffic costs, or just give us a try without investing too much time into migrating to another cloud.

Usage

Open Integrate section in Uploadcare dashboard and go to the Proxy tab.

Step 1. Add allowed domains

Specify the domain names that host your files. The Proxy will recognize these domains and deliver files successfully. You can add more than one domain.

Step 2. Add Proxy prefix

Add the Proxy prefix that contains your Endpoint to a file URL on the allowed domain:

https://yoursite.ucr.io/ + https://yoursite.com/assets/image.jpg =
https://yoursite.ucr.io/https://yoursite.com/assets/image.jpg

The original file will remain at its original place, so that older references will work as well.

Step 3. Apply image processing

You can apply image processing operations by adding one of the respective URL directives between the prefix and the media URL.

https://yoursite.ucr.io/-/preview/-/resize/500x/https://yoursite.com/assets/image.jpg

As a result, image.jpg will be resized and delivered with Uploadcare CDN.

Uploadcare process images on the fly. We count storage space only for original files. Processed versions don't occopy any space in your storage limit.

Step 4. Customize endpoint (optional)

By default, Uploadcare creates a proxy endpoint for every project automatically: PUBLIC_KEY.ucr.io (e.g., 88a247b663ba80c3bf6f.ucr.io).

You can customize endpoint URL:

  • CNAME or subdomain endpoint will look like: mydomain.ucr.io
  • A record or domain endpoint will look like: cdn.mydomain.com

Possible Errors

List of errors you might get when using Proxy:

Error

Description

[HTTP 400] Domain <yoursite.com> is not registered

You did not register a Proxy domain for your sites by dropping us a line at help@uploadcare.com.

[HTTP 400] Domain <yoursite.com> is not allowed

You tried fetching a file from a domain that was not allowed. Check settings or contact us to add the domain as allowed for your account.

[HTTP 400] Failed to parse file URL

Your prefix was added to an invalid URL. Consider checking that URL.

[HTTP 404]

You tried fetching an unreachable file. Consider checking its URL.

[HTTP 502] 'is_ready' timeout

A problem occurred when trying to upload a file to our storage. Try again later and if it didn't help you always can contact us.

Other errors

Proxy uses the from_url method, so you can also get general errors related to the Upload API or specific to the from_url method.

Proxy billing

This feature is free and available across all plans. It is important to note that proxy uses your project upload units and storage limits since files are fetched and saved first before they are available on Uploadcare's CDN.