@antelopejs/dms-media

中文文档
0.7.1发布于 2026/11/05Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 1959

Media library for the AntelopeJS DMS: uploads, folders with per-folder permissions, image sizes and light editing, with a Finder-style explorer.

原始使用文档
文档目录7 节
  1. What it does
  2. Install
  3. Quick start
  4. Compatibility
  5. Documentation
  6. Contributing
  7. License

@antelopejs/dms-media

npm License Discord Documentation

A media library for the AntelopeJS DMS: uploads, folders, image sizes and light editing.

The Media library of the Helio demo: views and folders on the left, the six top-level folders in the middle

What it does

  • Organises images, videos and documents in a Finder-style explorer, with smart views, search, drag and drop and bulk actions.
  • Uploads files straight to the project's file storage and delivers them from stable /media/<id>/<name> URLs.
  • Renders named image sizes on first request, with crop and rotation that can revert to the original.
  • Applies per-folder rights built on the DMS permissions and roles.
  • Adds an AssetType form field, from @antelopejs/interface-dms-media, that opens the library as a picker on your pages.
  • Lets a project ship folders and files as code with EnsureMediaFolder and ImportMediaAsset, created once and never overwriting what members changed.

Install

Run the AntelopeJS CLI from the root of a project that already loads @antelopejs/dms and a file storage module:

ajs project modules add @antelopejs/dms-media

Quick start

Point the module's links at the API's public URL, and allow the dashboard's origin, since the browser uploads straight to the storage:

// antelope.config.ts
"dms-media": {
  source: { type: "package", package: "@antelopejs/dms-media", version: "^0.7.0" },
  config: {
    publicBaseUrl: "${@api.API_PUBLIC_BASE_URL}",
  },
},
api: {
  config: {
    cors: { allowedOrigins: ["https://dms.example.com"] },
  },
},

Restart the backend, then the frontend, and open Modules › Media (/modules/media/overview). To let members pick files from your own pages, add an asset field:

import { AssetType } from "@antelopejs/interface-dms-media";

new AssetType({
  mimetypes: ["image/*"],
  binding: { id: "articles.cover", folderName: "Article covers", permissionsFromPage: ArticlesPage },
});

Compatibility

PackageSupportedTested with
@antelopejs/interface-api>=0.3.0 <1.0.00.3.0
@antelopejs/interface-api-util>=0.3.0 <1.0.00.3.0
@antelopejs/interface-core>=0.4.0 <1.0.00.4.0
@antelopejs/interface-database>=0.3.0 <1.0.00.3.0
@antelopejs/interface-database-decorators>=0.2.0 <1.0.00.2.0
@antelopejs/interface-dms>=0.12.0 <1.0.00.12.0
@antelopejs/interface-dms-media>=0.3.0 <0.4.00.3.1
@antelopejs/interface-file-storage>=0.1.6 <1.0.00.1.6

The module also needs a DMS backend in a release that implements the @antelopejs/interface-dms range in the table above, and the @antelopejs/dms-frontend renderer in the range its frontend module declares in engines["@antelopejs/dms-frontend"] of frontend-vue/package.json. The ajs dms CLI refuses to build it with a renderer outside that range.

  • File storage: an @antelopejs/interface-file-storage implementation, such as @antelopejs/file-storage-local.

Documentation

The guide's sources live in packages/dms-media/docs. The module ships the dms-media Claude Code skill in packages/dms-media/skills, declared under antelopeJs.skills.

Contributing

This package lives in the AntelopeJS/dms-media pnpm workspace, next to @antelopejs/interface-dms-media. Read CONTRIBUTING.md and the repository README for the development commands.

License

Apache-2.0

版本与发布记录

@antelopejs/dms-media 共发布 22 个版本,首次发布于 2026/09/17;过去 12 个月发布了 22 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.7.1latest2026/11/053 天前
0.7.02026/11/026 天前
0.6.22026/11/017 天前
0.6.12026/10/2415 天前
0.6.02026/10/2316 天前
0.5.12026/10/2019 天前

关于 @antelopejs/dms-media 的常见问题

@antelopejs/dms-media 是什么?

Media library for the AntelopeJS DMS: uploads, folders with per-folder permissions, image sizes and light editing, with a Finder-style explorer.

如何安装 @antelopejs/dms-media?

在项目目录运行 npm install @antelopejs/dms-media,或使用 pnpm add / yarn add / bun add。

@antelopejs/dms-media 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@antelopejs/dms-media 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@antelopejs/dms-media 可以商用吗?

@antelopejs/dms-media 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@antelopejs/dms-media 的下载量有多少?

根据 npm 官方下载统计,@antelopejs/dms-media 在 2026/10/06 – 2026/11/04 这 30 天内被下载 1,959 次,日均约 65 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@antelopejs/dms-media 还在维护吗?

最新版本 0.7.1 发布于 2026/11/05(3 天前);至今共发布 22 个版本,其中过去 12 个月发布了 22 个;首次发布于 2026/09/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。