Add isImage and isVideo keys
This commit is contained in:
parent
50881fc943
commit
5cd3594695
@ -52,6 +52,8 @@ export async function getFileInfo(fileId, isInternal = false) {
|
|||||||
file.uploader = uploader;
|
file.uploader = uploader;
|
||||||
file._id = undefined;
|
file._id = undefined;
|
||||||
file.__v = undefined;
|
file.__v = undefined;
|
||||||
|
file.isImage = file.contentType.includes("image");
|
||||||
|
file.isVideo = file.contentType.includes("video");
|
||||||
file.fileUrl =
|
file.fileUrl =
|
||||||
process.env.NEXT_PUBLIC_SITE_URL +
|
process.env.NEXT_PUBLIC_SITE_URL +
|
||||||
"/api/files/" +
|
"/api/files/" +
|
||||||
|
Reference in New Issue
Block a user