mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Keep content-type when using metadata templates
This commit is contained in:
@@ -197,6 +197,10 @@ export class BaseResourcesGenerator implements TemplatedResourcesGenerator {
|
||||
// Add metadata from .meta file if there is one
|
||||
if (metaLink) {
|
||||
const rawMetadata = await this.generateMetadata(metaLink, options);
|
||||
if (!rawMetadata.contentType) {
|
||||
// Make sure this does not remove the content-type if none is explicitly defined
|
||||
rawMetadata.contentType = metadata.contentType;
|
||||
}
|
||||
const metaIdentifier = this.metadataStrategy.getAuxiliaryIdentifier(link.identifier);
|
||||
const descriptionMeta = new RepresentationMetadata(metaIdentifier);
|
||||
addResourceMetadata(rawMetadata, isContainerIdentifier(link.identifier));
|
||||
|
||||
Reference in New Issue
Block a user