PhatBrainSoftware.Cloudinary 1.0.1

.NET 6.0
There is a newer version of this package available.
See the version list below for details.
dotnet add package PhatBrainSoftware.Cloudinary --version 1.0.1
NuGet\Install-Package PhatBrainSoftware.Cloudinary -Version 1.0.1
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="PhatBrainSoftware.Cloudinary" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PhatBrainSoftware.Cloudinary --version 1.0.1
#r "nuget: PhatBrainSoftware.Cloudinary, 1.0.1"
#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.
// Install PhatBrainSoftware.Cloudinary as a Cake Addin
#addin nuget:?package=PhatBrainSoftware.Cloudinary&version=1.0.1

// Install PhatBrainSoftware.Cloudinary as a Cake Tool
#tool nuget:?package=PhatBrainSoftware.Cloudinary&version=1.0.1


Cloudinary for Blazor applications - Uses Cloudinary.

Getting Setup

You can install the package via the NuGet package manager just search for PhatBrainSoftware.Cloudinary. You can also install via powershell using the following command.

Install-Package PhatBrainSoftware.Cloudinary

Or via the dotnet CLI.

dotnet add package PhatBrainSoftware.Cloudinary

If you're using Visual Studio you can also install via the built in NuGet package manager.

Add the following to _Imports.razor:

@using PhatBrainSoftware.Cloudinary

Add the following to Program.cs:

builder.Services.AddTransient(sp => new CloudinaryUploadWidget(sp.GetService<IJSRuntime>()));

Basic Example

See code in the Index.razor page in the repo for more examples.

@page "/"

@inject IConfiguration Configuration

<button class="btn btn-primary" type="submit" @onclick="@OnUploadClick">Upload</button>

@code {
    CloudinaryUploadWidget CloudinaryUploadWidget { get; set; }

    protected async override Task OnInitializedAsync()
        var cloudinaryUploadWidgetOptions =
            new CloudinaryUploadWidgetOptions
                    CloudName = this.Configuration["CLOUDINARY_CLOUD_NAME"],
                    Folder = "test",
                    Sources = new[] { "local", "url", "camera" },
                    CroppingAspectRatio = 1,
                    MaximumImageHeight = 200,
                    MaximumImageWidth = 200

        await this.CloudinaryUploadWidget.CreateAsync(cloudinaryUploadWidgetOptions);

    protected async Task OnUploadClick(
        MouseEventArgs mouseEventArgs)
        await this.CloudinaryUploadWidget.OpenWidgetAsync();
Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
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
1.0.5 468 5/1/2022
1.0.4 278 4/30/2022
1.0.3 278 4/30/2022
1.0.2 272 4/30/2022
1.0.2-alpha 80 4/30/2022
1.0.1 270 4/29/2022