fix: media file path (#3166)

This commit is contained in:
Bartholomew 2020-01-29 18:54:01 +01:00 committed by GitHub
parent 6594b9b039
commit d1179e3999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -691,7 +691,12 @@ export class Backend {
assetProxies.map(asset => {
// update media files path based on entry path
const oldPath = asset.path;
const newPath = selectMediaFilePath(config, collection, entryDraft.get('entry'), oldPath);
const newPath = selectMediaFilePath(
config,
collection,
entryDraft.get('entry').set('path', path),
oldPath,
);
asset.path = newPath;
});
} else {