Upload video bug fix
This commit is contained in:
@@ -102,7 +102,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<PrimaryButton label="Try again" />
|
<PrimaryButton label="Try again" />
|
||||||
</div>
|
</div>
|
||||||
{:else if $uploadCourseVideoStore.formRes?.success}
|
{:else if !$uploadCourseVideoStore.formRes?.success}
|
||||||
<div class="h-full w-full flex flex-col items-center justify-center rounded-xl">
|
<div class="h-full w-full flex flex-col items-center justify-center rounded-xl">
|
||||||
<img src="/video-upload-error.svg" alt="upload error" />
|
<img src="/video-upload-error.svg" alt="upload error" />
|
||||||
<span class="pt-3 pb-2">
|
<span class="pt-3 pb-2">
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ const S3 = new S3Client({
|
|||||||
const supabase = getSupabase();
|
const supabase = getSupabase();
|
||||||
|
|
||||||
const uploadToMuse = (s3Data, fileName, lessonId, fileUrl) => {
|
const uploadToMuse = (s3Data, fileName, lessonId, fileUrl) => {
|
||||||
|
try {
|
||||||
const form = new FormData();
|
const form = new FormData();
|
||||||
form.append('file', s3Data, fileName);
|
form.append('file', s3Data, fileName);
|
||||||
|
|
||||||
@@ -76,6 +77,9 @@ const uploadToMuse = (s3Data, fileName, lessonId, fileUrl) => {
|
|||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log('Upload to Muse failed', error);
|
console.log('Upload to Muse failed', error);
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log('Upload to Muse failed', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const load = ({ params = { id: '' } }) => {
|
export const load = ({ params = { id: '' } }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user