Blob Management

Blob Management is in development and has not been released yet. Its packages are not published. These pages describe what is built.

Blob Management is an ABP infrastructure module: a BLOB storing provider with a ledger. Business systems store their bytes through it; it writes a record of each BLOB, and from those records come the tenant's storage allocation, the usage figures and a management page for administrators. It runs inside an application's own process, or once as a service that several applications share.

It serves business systems. It has no business rules and is not shown to ordinary users: a business system builds the UI its users store, rename, move and delete files with, applies its own rules, and calls Blob Management for them - from its back end as an OAuth client, and for its users' browsers with upload tickets and read links that Blob Management signs.

Who Calls It

Caller Admitted by Does
An application In the same process: trusted. Over HTTP: an OAuth client granted the container's files, with a token that carries no user. Stores and reads BLOBs by name (Using It From an Application) and files by id (Keeping Files by Id).
A browser An upload ticket or a read link an application asked for. Stores one file, pending until the application confirms it, or reads one file, for a few minutes (Upload Tickets, Read Links).
Anyone The address of a file its application marked public. Reads it, resized if it is a picture (Public Addresses).
A user A directory permission granted on the container. Creates, renames, moves and deletes directories (Directories).
An administrator BlobManagement.Containers. Reads the usage, the containers, their directories and files, and the files' bytes (Usage, Angular UI).

No permission lets an end user store, change or remove a file, or read one without the management permission (Permissions): a user's browser comes in only with a ticket or a link its application asked for.

Two Ways to Address a File

An application reaches a managed container in two ways, and both end in the same table of files:

BLOBs by name Files by id
What it is ABP's IBlobContainer with container.UseBlobManagement(...), or IBlobManagementBlobService. IBlobManagementFileService: list a place, read one file and its bytes, store, rename, move, delete.
How a file is addressed By the name the application saved it under, unique among the container's files. By its id. Its name is a display name and may repeat.
Where it sits At the top of the container. It is never renamed or moved. At the top of the container, or in a directory.
What it suits An application's own BLOB containers, unchanged. A business system's file library: attachments, documents, media.

What every managed container adds to plain BLOB storing:

  • a storage allocation for each tenant, across every container (Setting Up);
  • usage figures: what the tenant, each container, each user and each client store, and, for the host, each tenant (Usage);
  • upload rules per container, as presets of the BLOB Storing pipeline contributors (Presets);
  • public read at /blobs with image sizing, for the files an application marks public (Public Addresses);
  • upload tickets and read links, so a browser sends or reads a file directly (Keeping Files by Id);
  • directories, in a container that allows them (Directories).

What It Is Not

Blob Management keeps and counts the BLOBs business systems store. It is not a cloud drive: no personal drives, no sharing of a file with other users, no file manager for end users. For a document management application with sharing for end users, use ABP's File Management module; Blob Management does not compete with it.

How a File Is Stored

Every file has a record, a file descriptor: the container, its name, the physical BLOB that holds the bytes, the type detected from the bytes, the size, the SHA-256 of what was uploaded when the caller sent one to be verified, the directory it is in (for a file addressed by id in a container with directories), the tenant, the user it is counted for (CreatorId) and the OAuth client that stored it over HTTP (ClientId).

  • The physical BLOB is named by Blob Management - 32 random hexadecimal digits and the extension of the detected type - and is the file's own: two files never share one, even with the same bytes, and it is deleted with its file.
  • The type is detected from the bytes, and a name whose extension contradicts the content is refused, before anything is stored.
  • The container's pipeline contributors - its size limit, allowed types, image processing - run when the bytes are stored.

Packages

Package Description
Dignite.Abp.BlobStoring.BlobManagement The BLOB storing provider and the public address builder. The only package a business module that stores by name needs.
Dignite.Abp.BlobManagement.Domain.Shared, .Domain The file and directory descriptors and their managers, managed containers and their presets, the tenant features, the directory import.
Dignite.Abp.BlobManagement.Application.Contracts, .Application IBlobManagementBlobService and IBlobManagementFileService with their in-process implementations, the container, directory and usage services and their authorization, the permissions, startup checks, public reads.
Dignite.Abp.BlobManagement.HttpApi, .HttpApi.Client The HTTP API, and the C# client proxies a host uses to reach a remote Blob Management.
Dignite.Abp.BlobManagement.EntityFrameworkCore, .MongoDB The database providers.
Dignite.Abp.BlobManagement.Installer The entry point ABP Studio and ABP Suite install the module through.
@dignite/ng.blob-management Angular UI: the management page - usage, directories, files read-only.

Pages

  • Setting Up: install the module in a host, declare its containers, presets, the tenant allocation.
  • Using It From an Application: UseBlobManagement, Blob Management in the same process or remote, public addresses.
  • Keeping Files by Id: IBlobManagementFileService, what a business system's file library calls, public files, upload tickets and read links, and who a file is counted for.
  • Hosting Modes: one host, or Blob Management as its own service, and what the second needs - routes, Data Protection, CORS, a CDN.
  • Directories: containers that allow directories, the tree, and the directory API.
  • Usage: stored bytes, by tenant, container, user and client.
  • Permissions: the management permission, grants on a container, and who may do what.
  • Angular UI: the management page and its parts.
  • Importing a Directory Tree: filing existing files into directories by a path they carry.

See Also