Cloudinary Blog

FTP API for Cloudinary: Real-Time Synchronization

By
FTP API for Cloudinary: Real-Time Synchronization

tl;dr Diagrams and blueprints for FTPing on Cloudinary


As a robust, effective solution for managing digital media, Cloudinary offers a RESTful API for provisioning and maintenance. That API enables numerous operations, from basic ones like image uploads to advanced ones, such as creation of named transformations and AI-based search.

However, despite its versatility for programming languages and frameworks, RESTful API does not comply with File Transfer Protocol (FTP), which has been in use for 50 years. Not only are FTP clients user-friendly, they can also seamlessly upload, delete, or download files in bulk and synchronize with the file system in question, whether automated or otherwise.

We've created the 'FTP API for Cloudinary', which translates FTP API calls into Cloudinary RESTful API calls. The FTP API enables you to use standard FTP clients for managing media assets in your Cloudinary account. Using this FTP API, you can maintain work procedures that involve FTP transfers.

For example, suppose you migrate to Cloudinary and your organization is engaged with photography agencies. The agencies are used to sending their photoshoot files to you over FTP. You could take advantage of the FTP API for Cloudinary to avoid changing a smoothly working process, enabling a seamless transparent migration to Cloudinary.

This post demonstrates how to use FTP on Cloudinary through an example of real-time synchronization. A second example on bulk uploads will be the subject of part 2 of this series.

Note
The FTP API for Cloudinary is based on the Amazon Web Services’(AWS) Simple Storage Service (S3) and Python lambda. For the code in its entirety, see the blueprint in the Github repository.

The Process

The diagram below illustrates the process of a unidirectional synchronization of files to Cloudinary in real time with the FTP API.

Diagram

Here’s the step-by-step workflow:

  1. The FTP source uploads a file to the user’s S3 bucket. Be sure to set your bucket to accept Cloudinary’s bucket GetObject requests and to send event notifications. For details, see the blueprint.
  2. S3 notifications are sent to an AWS Lambda.
  3. The AWS lambda function sends an API Upload request to Cloudinary.
  4. Cloudinary uploads the file from the user’s S3 bucket.

This process has the following advantages over Cloudinary automated uploads because—

  • Your assets get automatically synchronized to your Cloudinary account without them needing to be accessed by a user (whereas Cloudinary auto-upload is triggered by an end-user request).
  • If any eager transformation was defined on those uploaded assets, then your user will not have to wait for it.
  • Cloudinary’s powerful search engine is on, geared up to deliver complete results set to your search criteria.
  • Newer versions of the same object are synchronized.
  • Deleted and renamed objects are synchronized.
  • The upload date is preserved.
  • Optionally, you can set up synchronization of metadata and customize permissions and access control for the uploaded objects.

Conclusion

Cloudinary's native API deftly mimics FTP tasks, making this FTP API for Cloudinary possible. As a result, FTP users can continue enjoying the simple and smooth experience typical of classic FTP operations. At the same time, you and your organization can enjoy all the media management benefits of Cloudinary, with every FTP'd file automatically synchronizing with your Cloudinary account. Do try it out!

Recent Blog Posts

Our $2B Valuation

By
Blackstone Growth Invests in Cloudinary

When we started our journey in 2012, we were looking to improve our lives as developers by making it easier for us to handle the arduous tasks of handling images and videos in our code. That initial line of developer code has evolved into a full suite of media experience solutions driven by a mission that gradually revealed itself over the course of the past 10 years: help companies unleash the full potential of their media to create the most engaging visual experiences.

Read more
Direct-to-Consumer E-Commerce Requires Compelling Visual Experiences

When brands like you adopt a direct–to-consumer (DTC) e-commerce approach with no involvement of retailers or marketplaces, you gain direct and timely insight into evolving shopping behaviors. Accordingly, you can accommodate shoppers’ preferences by continually adjusting your product offering and interspersing the shopping journey with moments of excitement and intrigue. Opportunities abound for you to cultivate engaging customer relationships.

Read more
Automatically Translating Videos for an International Audience

No matter your business focus—public service, B2B integration, recruitment—multimedia, in particular video, is remarkably effective in communicating with the audience. Before, making video accessible to diverse viewers involved tasks galore, such as eliciting the service of production studios to manually dub, transcribe, and add subtitles. Those operations were costly and slow, especially for globally destined content.

Read more
Cloudinary Helps Minted Manage Its Image-Generation Pipeline at Scale

Shoppers return time and again to Minted’s global online community of independent artists and designers because they know they can count on unique, statement-making products of the highest quality there. Concurrently, the visual imagery on Minted.com must do justice to the designs into which the creators have poured their hearts and souls. For Minted’s VP of Engineering David Lien, “Because we are a premium brand, we need to ensure that every single one of our product images matches the selected configuration exactly. For example, if you pick an 18x24 art print on blue canvas, we will show that exact combination on the hero images in the PDF.”

Read more
Highlights on ImageCon 2021 and a Preview of ImageCon 2022

New year, same trend! Visual media will continue to play a monumental role in driving online conversions. To keep up with visual-experience trends and best practices, Cloudinary holds an annual conference called ImageCon, a one-of-a-kind event that helps attendees create the most engaging visual experiences possible.

Read more