feat: page attachments endpoint and modal (#2386)

* feat: page attachments endpoint

* feat: attachments modal
This commit is contained in:
Philip Okugbe
2026-08-12 14:04:33 +01:00
committed by GitHub
parent 089286f6cf
commit 9414a38215
12 changed files with 424 additions and 6 deletions
@@ -3,7 +3,17 @@ import loadImage from "blueimp-load-image";
import {
AvatarIconType,
IAttachment,
IPageAttachment,
} from "@/features/attachments/types/attachment.types.ts";
import { IPagination, QueryParams } from "@/lib/types.ts";
export async function getPageAttachments(
pageId: string,
params?: QueryParams,
): Promise<IPagination<IPageAttachment>> {
const req = await api.post("/pages/attachments", { pageId, ...params });
return req.data;
}
async function compressAndResizeIcon(
file: File,