From c64f8f720c071f342f52ed3ae23332bc39096893 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Thu, 11 Mar 2021 14:10:54 +0100 Subject: [PATCH] fix: field based media_folder (#5095) --- 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 3308272e..9869c153 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;