diff --git a/packages/server/services/posts/classes/posts/methods/create.js b/packages/server/services/posts/classes/posts/methods/create.js index 63041acd..bce503c0 100644 --- a/packages/server/services/posts/classes/posts/methods/create.js +++ b/packages/server/services/posts/classes/posts/methods/create.js @@ -17,6 +17,9 @@ export default async (payload = {}) => { } if (isAttachmentArray) { + // clean empty attachments + attachments = attachments.filter((attachment) => attachment) + // fix attachments with url strings if needed attachments = attachments.map((attachment) => { if (typeof attachment === "string") {