Cloudinary Blog
Automating File Upload and Sharing

As computer users, we constantly upload files, transferring them from one system to another over a network. You can perform uploads on a terminal, such as through the SSH File Transfer Protocol (SFTP) or Secure Copy Protocol (SCP), File Transfer Protocol (FTP) clients, or web browsers. Generally, you upload files to move data to a server or a managed service like cloud storage, but you can also send files between distributed clients.

This article explains the basics of FTP, peer-to-peer (P2P), and web-browser uploads, as well as Cloudinary’s automated upload capabilities that save time and improve workflows.

What Is a File Upload?

File uploads are cross-system data transfers. You can upload files in one of three ways:

  • Client-to-server upload, which transfers files according to the client-server mode, such as when you upload an image or video through a form on a website.
  • Remote upload, which transfers data from one remote system to another under the control of a local system, e.g., from cloud storage to a website, when the connection between the remote systems is faster than that between the local and remote systems. Additionally, you can transfer files between only the remote systems with this technique.
  • Peer-to-peer (P2P) sharing, which shares files between users through a decentralized network of devices. Here, each device can serve as client and server, enabling both uploads and downloads.

In this article, you will learn:

Traditional File Upload Techniques

This section describes how to upload files in the traditional way.

FTP

FTP, the language for TCP/IP networks, i.e. the Internet, is a secure way of transferring files between devices or servers and between clients and servers.

Typically, you download files from a web server with FTP. For uploads to a server, you need an FTP client, a utility through which to log in to FTP servers so that you can query the server, define transfer modes, and then upload.

Peer to Peer

P2P transfers start with a search for available connected users through a client. After a connection is made, you can download files from those users while they upload to you, or vice versa. In a P2P network, transfers occur across peers (nodes or end-user computers) with no need for distribution servers.

Napster and BitTorrent are well-known examples of P2P networks. Although they do not store file data on a central server, those networks can maintain trackers or index servers to help you locate the file you want. Also, multiple users can simultaneously upload or download the same file, speeding up the rate of transfer and easing the burden on a single user.

Web Browsers

Uploading from a web browser is the most common way for transferring files to a remote server, typically through an HTML form with the upload capabilities defined in JavaScript (JS) in either of these ways:

  • A jQuery plugin or JS uploader, which offers the upload capability and interface through JS or jQuery libraries. Two plugin examples are Uppy and FilePond.
  • A file-upload service, which offers a widget you can embed in your page for uploads, which are typically connected to a content delivery network (CDN) for delivery to users later. Cloudinary is an example of an excellent upload service.

Automating File Upload in Popular Programming Languages With Cloudinary

A common request for websites is automated file upload for audiences. Afterwards, the audience can have the uploaded files delivered securely to online storage, displayed, and, if desired, shared with others.

Cloudinary is a cloud-based service through which you can modify, manage, and distribute media; as well as automate file upload in your web apps. It only takes a few lines of code in the popular programming languages, as described below.

PHP

By leveraging the API in the Cloudinary PHP software development kit (SDK), you can upload images, manage and create sprites, embed images, and generate URLs for manipulation or transformation. This SDK supports PHP 5.3 or later.

For details, see the post Uploading PHP Files and Rich Media the Easy Way.

AJAX

To directly upload files with AJAX, create an HTML form, download Cloudinary’s JS library, and then build a JS file that defines your upload configurations.

In the same way, you can upload directly to a back-end server with AJAX along with a PHP script that handles server communications.

For details, see the post AJAX File Upload: Quick Tutorial and Time-Saving Tips.

Android

Preserving quality as files pass between the sender and receiver is a difficult task. However, apps like WhatsApp transfer media files at huge scale with hardly any quality loss. You can do that in your app, too.

For details, see the post Clone WhatsApp Technology to Build a File Upload Android App.

jQuery

With jQuery, you can upload files to the Cloudinary cloud without an intermediary server, delivering faster and bypassing web-host limitations on uploads. Also, Cloudinary’s jQuery plugin’s convenient drag-and-drop interface enables audiences to perform uploads on your site.

For details, see the post Direct Image Uploads From the Browser to the Cloud With jQuery.

Angular

You can upload files through Angular on Cloudinary by building an Angular component or form control with which to pass files to your app’s back-end. No need to expend the time and effort to develop a back-end API.

For details, see the post File Upload With Angular to Cloudinary.

Vue

By integrating with the Cloudinary widget, you can upload files in any Vue project. Just add the openUploadModal function and an Upload button and then integrate the widget in your index.html file. No back-end setup is required.

For details, see the post Uploading Vue Files and Rich Media in Two Easy Steps.

Node.js

You can upload Node.js files to the Cloudinary cloud or to a local server. To do that, download Cloudinary’s Node.js SDK and the streamifier library. Afterwards, set up a Node project and build an upload process that relies on the multer package, which enables multipart uploads..

For details, see the post Node.js File Upload.

Laravel

To upload files to local servers or the cloud through Laravel, use a file-upload controller and upload-form pair and the storeUploads method. To store uploads in the cloud, use Cloudinary’s Laravel SDK and the cloudinary() helper function.

For details, see the post Laravel File Upload to a Local Server Or to the Cloud.

Javascript

Cloudinary offers a JS upload widget whose API you can integrate with your HTML forms for uploads to the cloud. The widget supports uploads from various sources, including remote URLs and Facebook, Dropbox, Google Drive, and Shutterstock accounts.

For details, see the post JavaScript File Upload to Cloudinary.


Do give Cloudinary a try and build file-upload capabilities with the popular programming languages described above. To start, create a free Cloudinary account.


See Our Additional Guides on Cloud Storage Topics

Together with our content partners, we have authored in-depth guides on several other topics that can also be useful as you explore the world of Cloud Storage

S3 Storage: Authored by NetApp

Learn the basics of storing data in Amazon Simple Storage Service (S3), Amazon’s first cloud service and still one of its most popular.

Cloud File Sharing: Authored by NetApp

File shares support some of the most important workloads that enterprise businesses rely on, and the resources of the public cloud have created interesting new possibilities. Every major public cloud provider now offers its own cloud file sharing service, each with its own target workloads and considerations. But not every enterprise will find what they’re looking for in a fully managed, all-cloud service.

See top articles in our cloud file sharing guide:

Google Cloud Storage: Authored by NetApp

Google Cloud offers a variety of storage options for you to choose from. These services form the base of many other services in the cloud and understanding what your options are can help you manage your cloud more efficiently.

This guide explains what Google Cloud Storage options exist and their common uses.

See top articles in our Google Cloud storage guide:

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