From 408e0fc20388f8a00057702c883f27b67a793f07 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Thu, 11 Mar 2021 12:39:57 +0100 Subject: [PATCH] fix: field based media_folder --- packages/netlify-cms-core/src/actions/entries.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/netlify-cms-core/src/actions/entries.ts b/packages/netlify-cms-core/src/actions/entries.ts index 3308272e7d6f..9869c1531e01 100644 --- a/packages/netlify-cms-core/src/actions/entries.ts +++ b/packages/netlify-cms-core/src/actions/entries.ts @@ -852,7 +852,12 @@ export function getMediaAssets({ entry }: { entry: EntryMap }) { const assets = filesArray .filter(file => file.get('draft')) .map(file => - createAssetProxy({ path: file.get('path'), file: file.get('file'), url: file.get('url') }), + createAssetProxy({ + path: file.get('path'), + file: file.get('file'), + url: file.get('url'), + field: file.get('field'), + }), ); return assets;