VOOZH about

URL: https://www.nuget.org/packages/DragonFly.ImageWizard/

โ‡ฑ NuGet Gallery | DragonFly.ImageWizard 1.0.37


๏ปฟ

๐Ÿ‘ Image
DragonFly.ImageWizard 1.0.37

dotnet add package DragonFly.ImageWizard --version 1.0.37
 
 
NuGet\Install-Package DragonFly.ImageWizard -Version 1.0.37
 
 
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="DragonFly.ImageWizard" Version="1.0.37" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DragonFly.ImageWizard" Version="1.0.37" />
 
Directory.Packages.props
<PackageReference Include="DragonFly.ImageWizard" />
 
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 DragonFly.ImageWizard --version 1.0.37
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DragonFly.ImageWizard, 1.0.37"
 
 
#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 DragonFly.ImageWizard@1.0.37
 
 
#: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=DragonFly.ImageWizard&version=1.0.37
 
Install as a Cake Addin
#tool nuget:?package=DragonFly.ImageWizard&version=1.0.37
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DragonFly ยป Headless ASP.NET Core CMS + Blazor

๐Ÿ‘ License: MIT

Package Release
DragonFly.Core ๐Ÿ‘ NuGet
DragonFly.AspNetCore ๐Ÿ‘ NuGet
DragonFly.API ๐Ÿ‘ NuGet
DragonFly.Client ๐Ÿ‘ NuGet
DragonFly.Generator ๐Ÿ‘ NuGet
DragonFly.ImageWizard ๐Ÿ‘ NuGet
DragonFly.MongoDB ๐Ÿ‘ NuGet
DragonFly.Identity ๐Ÿ‘ NuGet
DragonFly.ApiKeys ๐Ÿ‘ NuGet

Features

  • Define schema with custom fields
  • Create, update, delete and publish/unpublish content items based on schema
    • Create new Fields with FieldGenerator
  • Create typed content items with ModelGenerator
  • BlockField for structured page content
    • TextBlock, HtmlBlock, ColumnBlock, GridBlock, AssetBlock, YouTubeBlock, CodeBlock,..
  • Asset management
    • Folder tree
    • Asset metadata like ImageMetadata and PdfMetadata
      • Use IAssetProcessing after asset upload
    • Create thumbnails for image and pdf files with ImageWizard
  • REST API
  • Permissions for content, schema, asset, asset folder, webhooks
    • Dynamic permissions for every schema
  • Background tasks
  • WebHooks
  • MongoDB storage
    • Create proxies with ProxyGenerator
  • Admin interface with Blazor

Getting started

Prerequisites

Create a new project from template

To use the project template you need first to download and install it from NuGet.

dotnet new install DragonFly.Templates

After this you can create the project with:

dotnet new DragonFly

If you have a remote MongoDB instance, you need to add some appsettings:

"MongoDB": {
 "Hostname": "localhost",
 "Database": "DragonFly_App",
 "Port": 27017,
 "Username": "",
 "Password": ""
 },

Use source generators to avoid reflection

  • FieldGenerator
  • ModelGenerator
  • ProxyGenerator

Supported fields

  • StringField
  • FloatField
  • BoolField
  • AssetField
  • ReferenceField
  • ComponentField
  • ArrayField
  • DateField
  • IntegerField
  • ColorField
  • GeolocationField
  • SlugField
  • XmlField
  • HtmlField
  • BlockField (HeadingBlock, TextBlock, HtmlBlock, CodeBlock, ContainerBlock, ColumnBlock, AssetBlock, ReferenceBlock, GridBlock,..)

How to create new content schema and content item

IContentStorage contentStorage = ...;//use MongoStorage or ClientContentService (http client)

//create brand schema
ContentSchema schemaBrand = new ContentSchema("Brand")
 .AddString("Name")
 .AddSlug("Slug")
 .AddTextArea("Description");

//Define schema for product
ContentSchema schemaProduct = new ContentSchema("Product")
 .AddReference("Brand")
 .AddString("Name", options => options.IsRequired = true)
 .AddSlug("Slug")
 .AddBool("IsAvailable", options => options.DefaultValue = true)
 .AddFloat("Price")
 .AddTextArea("Description", options => options.MaxLength = 255)
 .AddArray("Attributes", options => options
 .AddString("Name")
 .AddString("Value"));

await contentStorage.CreateAsync(schemaProduct);

//create product by schema
ContentItem contentProduct = schemaProduct
 .CreateContent()
 .SetReference("Brand", new ContentItem(Guid.Parse(""), schemaBrand))
 .SetString("Name", "ProductA")
 .SetBool("IsAvailable", true)
 .SetFloat("Price", 9.99)
 .SetTextArea("Description", "...")
 .AddArrayItem("Attributes", schemaProduct, item => item
 .SetString("Name", "Size")
 .SetString("Value", "M"));

await contentStorage.CreateAsync(contentProduct);

Create typed content

DragonFly.Generator

[ContentItem]
public partial class BlogPost
{
 [DateField(Required = true)]
 public partial DateTime? Date { get; set; }

 [StringField(Required = true, Searchable = true, ListField = true, MinLength = 8, MaxLength = 512)]
 public partial string? Title { get; set; }

 [TextField]
 public partial string? Description { get; set; }

 [SlugField(Required = true, Index = true)]
 public partial string? Slug { get; set; }

 [AssetField(ListField = true, ShowPreview = true)]
 public partial AssetField Image { get; set; }

 [BlockField]
 public partial BlockField MainContent { get; set; }
}
Register typed content
builder.Services.AddDragonFly()
 .AddModels(x => x.Add<BlogPost>()); 
Use queries for typed content
//get all items
var result = await ContentStorage.QueryAsync<BlogPostModel>(x => x
 .Published(true)
 .Top(10)
 .Slug(x => x.Slug, "my-product")
 .Integer(x => x.Quantity, 10, NumberQueryType.Equal)
 .String(x => x.Title, "Test", StringQueryType.Equal)
);

BackgroundTask

For long running jobs you can use the BackgroundTaskManager.

IBackgroundTaskManager taskManager = app.Services.GetRequiredService<IBackgroundTaskManager>();
taskManager.Start("Test", async ctx => await Task.Delay(TimeSpan.FromSeconds(60), ctx.CancellationToken));

DragonFly.AspNetCore

builder.Services.Configure<DragonFlyOptions>(Configuration.GetSection("General"));
builder.Services.Configure<MongoDbOptions>(Configuration.GetSection("MongoDB"));

//add DragonFly services
builder.Services.AddDragonFly(x => x
 .AddImageWizard(requireAuthorization: false)
 .AddRestApi()
 .AddMongoDbStorage()
 .AddMongoDbIdentity()
 .AddApiKeys());

var app = builder.Build();

//init DragonFly
await app.InitDragonFlyAsync();

if (env.IsDevelopment())
{
 app.UseDeveloperExceptionPage();
 app.UseWebAssemblyDebugging();
}

app.UseDragonFly();
app.UseDragonFlyManager();
app.UseRouting();
app.Run();

DragonFly.Client (Blazor)

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<DragonFly.App.Client.App>("app");

//Register DragonFly components
builder.AddDragonFlyClient(x => x
 .AddRestClient()
 .AddIdentity()
 .AddApiKeys());

WebAssemblyHost host = builder.Build();

await host.InitDragonFlyAsync();
await host.RunAsync();
Product Versions Compatible and additional computed target framework versions.
.NET net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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
1.0.37 339 8/14/2025
1.0.35 328 6/1/2025
1.0.34 328 5/5/2025
1.0.31 636 3/24/2025
1.0.30 612 3/24/2025
1.0.29 646 3/24/2025
1.0.28 261 2/25/2025
1.0.27 291 2/5/2025
1.0.26 259 1/28/2025
1.0.25 273 1/2/2025
1.0.24 284 12/30/2024
1.0.22 286 11/19/2024
1.0.21 271 11/19/2024
1.0.20 270 11/19/2024
1.0.19 285 11/18/2024
1.0.18 271 11/17/2024
1.0.17 259 11/17/2024
1.0.15 343 4/27/2024
1.0.14 374 3/19/2024
1.0.13 284 3/19/2024
Loading failed