diff --git a/apps/backend/src/modules/userModule/application/queryHandlers/findUserBucketsQueryHandler/findUserBucketsQueryHandlerImpl.integration.test.ts b/apps/backend/src/modules/userModule/application/queryHandlers/findUserBucketsQueryHandler/findUserBucketsQueryHandlerImpl.integration.test.ts index f69d831..7dbcae9 100644 --- a/apps/backend/src/modules/userModule/application/queryHandlers/findUserBucketsQueryHandler/findUserBucketsQueryHandlerImpl.integration.test.ts +++ b/apps/backend/src/modules/userModule/application/queryHandlers/findUserBucketsQueryHandler/findUserBucketsQueryHandlerImpl.integration.test.ts @@ -21,7 +21,7 @@ describe('FindUserBucketsQueryHandler', () => { let s3TestUtils: S3TestUtils; - const bucketName = 'bucketName'; + const bucketName = 'existing-bucket-name'; beforeEach(async () => { const container = TestContainer.create(); @@ -56,14 +56,14 @@ describe('FindUserBucketsQueryHandler', () => { it('returns no buckets when UserBucket exists but bucket does not exist in S3', async () => { const user = await userTestUtils.createAndPersist(); - const userBucket = await userBucketTestUtils.createAndPersist({ input: { userId: user.id } }); + await userBucketTestUtils.createAndPersist({ input: { userId: user.id } }); const { buckets } = await findUserBucketsQueryHandler.execute({ userId: user.id }); - expect(buckets).toEqual([{ name: userBucket.bucketName }]); + expect(buckets).toEqual([]); }); - it('returns UserBucket when UserBucket exists and bucketalso exists in S3', async () => { + it('returns UserBucket when UserBucket exists and bucket also exists in S3', async () => { const user = await userTestUtils.createAndPersist(); const userBucket = await userBucketTestUtils.createAndPersist({ diff --git a/apps/frontend/src/modules/resource/components/createResourceModal/createResourceModal.tsx b/apps/frontend/src/modules/resource/components/createResourceModal/createResourceModal.tsx index c0f5a0a..387e05c 100644 --- a/apps/frontend/src/modules/resource/components/createResourceModal/createResourceModal.tsx +++ b/apps/frontend/src/modules/resource/components/createResourceModal/createResourceModal.tsx @@ -11,7 +11,9 @@ interface CreateResourceModalProps { bucketName: string; } -const MAX_FILE_SIZE = Number(import.meta.env['VITE_MAX_FILE_SIZE']); +const DEFAULT_MAX_FILE_SIZE = 3865470566; + +const MAX_FILE_SIZE = Number(import.meta.env['VITE_MAX_FILE_SIZE']) || DEFAULT_MAX_FILE_SIZE; const acceptedImageAndVideoFormats = 'audio/,video/quicktime,video/x-msvideo,video/x-ms-wmv,.jpg,.jpeg,.tiff,.webp,.raw,.png,.mp4,.mov,.avi,.mkv,.wmv,.flv,.webm,.mpeg,.mpg,.3gp,.ogg,.ts,.m4v,.m2ts,.vob,.rm,.rmvb,.divx,.asf,.swf,.f4v' as string;