CDN or Content Delivery Network is a system of servers deployed in multiple data centers across the world. When someone pulls a file from CDN, that file is transferred to a client device via a server closest to the location of that client, which is way faster than using a route to some remote machine. Also, your file is cached on multiple servers. Hence you always get a better uptime.
On enterprise-level plans you have an option of using any CDN you prefer on top of our infrastructure.
To access the Uploadcare CDN, you make requests to
ucarecdn.com via HTTP
or HTTPS. A valid CDN URL to request a file from Uploadcare CDN looks like this:
CDN operations are applied to files by including URL directives in their respective CDN URLs:
:uuidstands for the unique file identifier, UUID, assigned on upload.
/-/is the mandatory delimiter for our parser to tell operations from one another and other path components.
:operation/:params/stands for a CDN operation URL directive and related parameters.
:filenameis an optional filename you can add after the trailing
/in a CDN URL.
Pipe operations to experience the full CDN potential:
Your original filenames can be accessed via our
REST API. You make a request and receive a JSON
response holding many file params including
original_filename. However, you can
decide to use any other filename; just put it after the trailing slash in your
CDN URL, see
:filename in the example:
:filename should be constructed as
filename.ext and comply with the section
3.3 of RFC3986. Long story short, the symbols you use in
a filename must conform to the
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
You can find the list of RFC3986 reserved characters here.
Since we do not allow using
/path/filename.ext, you can still use
without percent-encoding them, but such URLs can be unsafe to use with other
Here are some examples:
Safe: // adding a simple filename https://ucarecdn.com/85b5644f-e692-4855-9db0-8c5a83096e25/image.jpg // using a char allowed in the pchar definition https://firstname.lastname@example.org // allowed in pchar together with Image Transformations https://email@example.com // using a sub-delim allowed in pchar together with Image Transformations https://firstname.lastname@example.org // using percent-encoded gen-delims that are not allowed in pchar https://ucarecdn.com/85b5644f-e692-4855-9db0-8c5a83096e25/-/preview/-/grayscale/image%5Bdesaturated%5D@2x.jpg Unsafe: // using gen-delims that are not allowed in pchar without encoding https://ucarecdn.com/85b5644f-e692-4855-9db0-8c5a83096e25/-/preview/-/grayscale/image[desaturated]@2x.jpg
Groups are file collections. You can use those to organize content in your Uploadcare project. The advised use case for groups is using them in single content upload or delivery transactions.
:group_uuid is similar to file UUIDs with the only difference of having
~N at the end, where N stands for a number of files in a group. The maximum
group file limit is 1000. We set the limit to ensure your app would optimally
perform and interact with our API. Navigating through a URL holding group UUID will result in getting a list of individual UUIDs of files in that group.
When working with groups, you can request a single file by using its zero-based index,
Note, there is no
/-/ separator after a group UUID: the
/nth/ URL directive
does not belong to Image Transformations. Each group UUID
includes a number of files in this group so you could iterate through them.
Files in a group still have support for Image Transformations,
You can also make groups from processed files. Such files are added together with the respective sequences of operations. So, if you request a file from a group, it is invoked with all the stored operations. Adding more controls to such files will combine them with the existing ones.
Getting a group as an archive is technically done via the
Current operation limits are:
- A total size of uncompressed files in a group should not exceed 2 GB.
- Any URL directives related to processing operations are discarded within a group are discarded: only original file versions are added to the output archive.
The workflow of getting an archived file group is straight-forward:
:group_uuid— UUID of a file group you want to get as an archive.
:format— the format of that output archive, we support
:filename— (optional) output filename: you can either specify a name for your archive or omit the parameter; more about filenames here.
Making a gallery is also based on a group processing operation,
Here’s how it works,
You can customize the layout and behavior of images in a gallery by adding Fotorama options to their URLs. The workflow is pretty much the same as with our Image Transformations except that we do not support image size, dimensions, and ratio manipulations here.
One of great use cases with
gallery is embedding a collection of images right
into your page via
<iframe src="/:group_uuid/gallery/-/nav/thumbs/-/fit/cover/-/loop/true/-/allowfullscreen/native/-/thumbwidth/100/" width="100%" height="450" allowfullscreen="true" frameborder="0"> </iframe>
By default, CDN instructs browsers to show images and download other file types.
inline control allows you to change this behavior.