Cloudinary Blog

Auto-Completing the Upload Code of Media Files With GitHub Copilot

Prosper Otemuyiwa
By Prosper Otemuyiwa
Auto-Completing the Upload Code of Media Files With GitHub Copilot

The past decade has seen massive improvements in software tools that facilitate coding. In fact, a campaign is currently underway to promote building software with no-code tools like Bubble, which promise to be a boon for those not acquainted with the rudiments of programming.

Separately, artificial Intelligence (AI) is certainly here to stay. In fact, it’s gaining popularity as an integrated infrastructure that deftly complement developer tools in speeding up and easing software development, ultimately yielding performant code.

GitHub Copilot Capabilities

As the world’s most popular code-hosting platform, GittHub serves billions of lines of open-source code. GitHub Copilot is an AI-enhanced programming companion that suggests lines and function blocks while you’re coding in an editor. Basically a code-autocomplete tool on steroids, GitHub Copilot is powered by Codex, the new AI system created by OpenAI and trained on all the code hosted on GitHub.

Seasoned developers are usually armed with code-editor extensions that help them build well-written, clean software faster. GitHub Copilot takes that to the next level, enabling adeptness with tools and libraries that might take time to familiarize with.

Functioning as an extension of Visual Studio (VS) Code, GitHub Copilot works locally in your VS Code editor and in the cloud on GitHub Codespaces. Currently, besides supporting many programming languages, GitHub Copilot is optimized for JavaScript, Ruby, Python, Typescript, Ruby, and Go.

Setup Procedure for GitHub Copilot and Cloudinary’s Node.js SDK

Cloudinary’s Node.js SDK offers intuitive and comprehensive image- and video-upload, transformation, optimization, and delivery capabilities, which you can leverage with code that seamlessly integrates with your Node.js app.

To set up GitHub for Cloudinary’s Node.js SDK, follow these steps:

  1. Join the GitHub Copilot waitlist.
  2. Start your local VS Code editor.
  3. Search for the GitHub Copilot extension and install it.
  4. Install the Cloudinary Node.js SDK.

Afterwards, set up a simple Node.js project with the npm init command.

Like me, you’ll likely be wowed with how fast GitHub Copilot starts churning out terrific suggestions on everything that you need to build a media app with Cloudinary. For details on the procedures for uploading, serving, and transforming media files, see the comprehensive documentation on Cloudinary’s Node.js SDK .

The video demo below shows how GitHub Copilot prescribes Cloudinary methods.

For all the functionalities you need to implement for your app, GitHub Copilot recommends the related code and documentation, greatly boosting your productivity. Happy testing!

Recent Blog Posts

The Pros and Cons of AVIF for Websites

AVIF is a 2019 spinoff from the AV1 video format developed by the Alliance for Open Media (AOM), whose members include Amazon, Apple, ARM, Facebook, Google, Huawei, Mozilla, Microsoft, Netflix, and Intel. As an open-source and royalty-free video codec, AVIF delivers much higher compression rates than the older image codecs like JPEG and WebP, and is on par with the brand-new JPEG-XL format, which does not work on any browser yet.

Read more
Get Your Media Moving Faster with Cloudinary’s Media Optimizer

So, your boss comes to you in a panic: he's just heard about Google's Core Web Vitals initiative and needs you to optimize the company website right now! "No problem," you say, hiding your fear that it's not something that can be done overnight. Just taking the first metric, Largest Contentful Paint (LCP), how can you possibly identify all the large elements - most likely images or video posters - of the many hundreds of pages that make up your site? There are already thousands of high-resolution (read massive) media files stored away, which marketing could use any time. How are you going to make sure they're all compressed to a size small enough to be delivered within the threshold? Not to mention all the new images and videos that will be created over time...

Read more
How to Tap Into the Value of User-Generated Content (UGC)

User-generated content (UGC) took off with, first of all, the advent of the internet and, subsequently, social networks. Everyday consumers were given keys to the kingdom, so to speak, so that they, too, could compose and post content, simultaneously engaging with others online. Twitter, Facebook, Instagram, Snapchat, TikTok—the networks through which we can create and publish content have grown exponentially, and brands are becoming aware of the benefits of tapping into the gold mines offered by those networks.

Read more
Identifying Countries by IP Address in Columnar Databases Through SQL

Cloudinary reaps a myriad of open web traffic, from ad networks to e-commerce sites. Our Data Science team is dedicated to analyzing the data for use internally and externally.

A glance at any General Data Protection Regulation (GDPR) article would reveal that—unlike Android device IDs (AID), through which users can reset their web address—keeping user identifiers, such as Internal Protocol (IP) and Media Access Control (MAC) addresses, as well as International Mobile Equipment Identity (IMEI), violates privacy. As a solution, you can discard all privacy identifications or make them visible to users for reset.

Read more
Digital-First Asset Management Explained

As the world changes, so does technology. I don’t need to name more than a handful of antiquated technologies before you nod in agreement: floppy disks, Walkmans, phone booths, VHS tapes, each of which have been phased out or rendered useless by new solutions that meet the same need but much more effectively.

Read more