diff --git a/.env.local b/.env.local new file mode 100644 index 00000000..536ce211 --- /dev/null +++ b/.env.local @@ -0,0 +1,9 @@ +PUBLIC_SUPABASE_ANON_KEY= +PUBLIC_SUPABASE_URL= +OPENAI_API_KEY= +CLOUDFLARE_TOKEN_VALUE= +CLOUDFLARE_ACCESS_KEY= +CLOUDFLARE_SECRET_ACCESS_KEY= +CLOUDFLARE_ACCOUNT_ID= +CLOUDFLARE_PUBLIC_ACCOUNT_ID= +MUSE_API_KEY= \ No newline at end of file diff --git a/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte b/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte index ad15166d..c26614fe 100644 --- a/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte +++ b/src/lib/components/Course/components/Lesson/Materials/Video/LocalVideo.svelte @@ -1,4 +1,5 @@ -{#if isLoaded === false} +{#if !isLoaded} -{:else if $uploadCourseVideoStore.formRes?.type === 'FILE_TOO_LARGE'} +{:else if formRes?.type === 'FILE_TOO_LARGE'}
upload error @@ -100,9 +124,9 @@ Sorry we video wasn’t uploaded. The file size is too big,
maximum size is 20 MB. Try again!

- + fileInput?.click()} />
-{:else if !$uploadCourseVideoStore.formRes?.success} +{:else if !formRes?.success}
upload error @@ -114,7 +138,10 @@ files.

- + ($uploadCourseVideoStore.isModalOpen = false)} + />
{:else}
diff --git a/src/routes/courses/[id]/lessons/[...lessonParams]/+page.server.js b/src/routes/courses/[id]/lessons/[...lessonParams]/+page.server.js index 5ad263cd..191a2c14 100644 --- a/src/routes/courses/[id]/lessons/[...lessonParams]/+page.server.js +++ b/src/routes/courses/[id]/lessons/[...lessonParams]/+page.server.js @@ -1,3 +1,10 @@ +/** + * This code isn't used anymore due to vercels 4.5MB limit of file sizes + * I will leave it here for reference and learning purposes + * The code has now been moved to classroomio-server, our express.js backend + * + * Read more: https://vercel.com/guides/how-to-bypass-vercel-body-size-limit-serverless-functions + * */ import { S3Client, PutObjectCommand, GetObjectCommand } from '@aws-sdk/client-s3'; import FormData from 'form-data'; import axios from 'axios';