feat: add ClamAV to scan for malicious files

This commit is contained in:
Elias Schneider
2023-01-13 10:16:35 +01:00
parent 16b697053a
commit 76088cc76a
18 changed files with 284 additions and 171 deletions

View File

@@ -1,7 +1,11 @@
import { Stack, TextInput } from "@mantine/core";
import { ModalsContextProps } from "@mantine/modals/lib/context";
const showShareLinkModal = (modals: ModalsContextProps, shareId: string, appUrl : string) => {
const showShareLinkModal = (
modals: ModalsContextProps,
shareId: string,
appUrl: string
) => {
const link = `${appUrl}/share/${shareId}`;
return modals.openModal({
title: "Share link",

View File

@@ -53,7 +53,10 @@ const Dropzone = ({
disabled={isUploading}
openRef={openRef as ForwardedRef<() => void>}
onDrop={(newFiles: FileUpload[]) => {
const fileSizeSum = [...newFiles, ...files].reduce((n, { size }) => n + size, 0);
const fileSizeSum = [...newFiles, ...files].reduce(
(n, { size }) => n + size,
0
);
if (fileSizeSum > config.get("MAX_SHARE_SIZE")) {
toast.error(