1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-06-30 14:40:10 +02:00

Fix env variables

This commit is contained in:
Elias Schneider 2022-05-02 13:31:07 +02:00
parent 13d4240a66
commit 2cdd802422
No known key found for this signature in database
GPG Key ID: D5EC1C72D93244FD
3 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
APPWRITE_FUNCTION_API_KEY=
PUBLIC_APPWRITE_HOST=http://localhost/v1
PUBLIC_MAX_FILE_SIZE="300000000" # Must be the same as in the _APP_STORAGE_LIMIT in the Appwrite env file
PUBLIC_DISABLE_REGISTRATION=true
APPWRITE_FUNCTION_API_KEY=""
PUBLIC_APPWRITE_HOST="http://localhost/v1"
PUBLIC_MAX_FILE_SIZE="300000000" # Note: Must be the same as in the _APP_STORAGE_LIMIT in the Appwrite env file
PUBLIC_DISABLE_REGISTRATION="true" # Note: In the Appwrite console you have to change your user limit to 0 if false and else to 1

View File

@ -8,4 +8,5 @@ services:
environment:
- APPWRITE_FUNCTION_API_KEY=${APPWRITE_FUNCTION_API_KEY}
- PUBLIC_APPWRITE_HOST=${PUBLIC_APPWRITE_HOST}
- PUBLIC_MAX_FILE_SIZE=${PUBLIC_MAX_FILE_SIZE}
- PUBLIC_MAX_FILE_SIZE=${PUBLIC_MAX_FILE_SIZE}
- PUBLIC_DISABLE_REGISTRATION=${PUBLIC_DISABLE_REGISTRATION}

View File

@ -53,13 +53,13 @@ const Dropzone = ({
setFiles: Dispatch<SetStateAction<File[]>>;
}) => {
const theme = useMantineTheme();
const config = useConfig()
const config = useConfig();
const { classes } = useStyles();
const openRef = useRef<() => void>();
return (
<div className={classes.wrapper}>
<MantineDropzone
maxSize={parseInt(config.APPWRITE_HOST)}
maxSize={config.MAX_FILE_SIZE}
onReject={(e) => {
toast.error(e[0].errors[0].message);
}}