Cloudtenary 2.0.3

dotnet add package Cloudtenary --version 2.0.3
                    
NuGet\Install-Package Cloudtenary -Version 2.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cloudtenary" Version="2.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cloudtenary" Version="2.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Cloudtenary" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cloudtenary --version 2.0.3
                    
#r "nuget: Cloudtenary, 2.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cloudtenary@2.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cloudtenary&version=2.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Cloudtenary&version=2.0.3
                    
Install as a Cake Tool

Cloudtenary

NuGet
NuGet Downloads

A lightweight .NET wrapper around Cloudinary for effortless file uploads.


Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Configuration
  5. Usage
  6. Example Methods
  7. Links

Introduction

Cloudtenary is a small, elegant .NET library that simplifies connecting to Cloudinary and performing media operations such as uploading, transforming, and deleting images, videos, and documents.

It wraps the official CloudinaryDotNet SDK with intuitive, ready-to-use methods and dependency injection support for modern .NET projects.


Features

  • Simple setup with a single AddCloudtenary() extension method
  • Image upload with optional resizing, cropping, and quality transformations
  • Video upload with support for resizing, trimming, fade effects, and text overlays
  • Document (raw file) upload
  • Clean deletion of any media type (image, video, or raw)
  • Built with DI-friendly design (ICloudtenary interface)
  • Small footprint, zero configuration clutter

Installation

Install the package via NuGet:

dotnet add package Cloudtenary

Or add it via the NuGet Package Manager in Visual Studio.


Configuration

In your appsettings.json or secret store, add your Cloudinary credentials:

"CloudtenarySettings": {
  "CloudName": "your-cloud-name",
  "Key": "your-api-key",
  "Secret": "your-api-secret"
}

Registration

In your Program.cs or Startup.cs, register the service:

using Cloudtenary.Extensions;
using Cloudtenary.Settings;

builder.Services.AddCloudtenary(options =>
{
    options.CloudName = builder.Configuration["CloudtenarySettings:CloudName"];
    options.Key = builder.Configuration["CloudtenarySettings:Key"];
    options.Secret = builder.Configuration["CloudtenarySettings:Secret"];
});

This automatically registers ICloudtenary as a singleton for dependency injection.


Usage

Inject the interface anywhere you need to upload or manage files:

using Cloudtenary;
using CloudinaryDotNet.Actions;

public class MediaService
{
    private readonly ICloudtenary _cloudtenary;

    public MediaService(ICloudtenary cloudtenary)
    {
        _cloudtenary = cloudtenary;
    }

    public async Task<string?> UploadImageAsync(Stream fileStream, string fileName)
    {
        var result = await _cloudtenary.UploadImageAsync(fileName, fileStream);
        return result?.Url;
    }
}

Example Methods

Upload an Image (with transformations)

Automatically resizes and optimizes the image:

await _cloudtenary.UploadImageAsync("avatar", "avatar.jpg", stream, 400, 400);

Upload an Image (original)

Uploads without any transformation:

await _cloudtenary.UploadImageAsync("avatar", stream);

Upload a Video (with effects)

Trims, fades in, and overlays text:

await _cloudtenary.UploadVideoAsync("intro.mp4", stream, 720, 480, 3, 60, "� Toba");

Upload a Document

Uploads any raw file (PDF, DOCX, ZIP, etc.):

await _cloudtenary.UploadRawFileAsync("resume.pdf", "resume.pdf", stream);

Delete a File

Removes any media type by its public ID:

await _cloudtenary.DeleteMediaFileAsync("videos/intro", ResourceType.Video);

Notes

  • CloudtenaryUploadResult contains PublicId and Url.
  • Videos are saved in the /videos folder, images in /images, and raw files in /documents.
  • Transformations use Cloudinary�s on-upload capabilities � no post-processing needed.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.3 189 11/2/2025
2.0.2 199 11/1/2025
2.0.1 170 11/1/2025
2.0.0 166 11/1/2025
1.0.2 192 6/20/2025
1.0.1 159 6/20/2025
1.0.0 164 6/20/2025