Skip to main content

AI Marketer 5はkoa-body v6を使用

AI Marketer 5はkoa-body v6を使用し、formidableをv2に更新します。これにより、アップロードされたファイルに新しいプロパティが追加されます。

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?Yes
🤖 Is this breaking change automatically handled by a codemod?No

破壊的変更の説明

AI Marketer v4では

ユーザーはカスタムエンドポイントを作成し、ctxオブジェクトでファイルを扱うことができます:

const endpoint = (ctx) => {
ctx.request.files.fileName.path
ctx.request.files.fileName.name
ctx.request.files.fileName.type
}

AI Marketer 5では

ユーザーは引き続きカスタムエンドポイントを作成し、ctxオブジェクトでファイルを扱うことができますが、プロパティ名が異なります:

const endpoint = (ctx) => {
ctx.request.files.fileName.filepath
ctx.request.files.fileName.originalFilename
ctx.request.files.fileName.mimetype
}

移行

This section regroups useful notes and procedures about the introduced breaking change.

注意

  • 公式のkoa-bodyドキュメンテーションには、変更点が一覧表示されています。
  • 公式のformidableドキュメンテーションには、変更点が一覧表示されています。

手動手順

ユーザーは、公式のkoa-bodyおよびformidableのドキュメンテーションを参照して、カスタムコードで使用されているプロパティを手動で更新する必要があります。