Skip to content

Commit

Permalink
🚑 Changed to 20MB animation everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario-SO committed Jan 19, 2025
1 parent f256212 commit 2595330
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ const SelectAnimation = ({
<VideoUpload
path={`organizations/${organizationId}/animations`}
options={{
placeholder: 'Upload animation video (max 15MB)',
maxSize: 20 * 1024 * 1024, // 15MB
placeholder: 'Upload animation video (max 20MB)',
maxSize: 20 * 1024 * 1024, // 20MB
}}
onChange={(e) => {
// Store the S3 URL directly
Expand Down
4 changes: 2 additions & 2 deletions packages/app/components/misc/form/videoUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const VideoUpload = forwardRef<HTMLInputElement, VideoUploadProps>(
className,
options: {
placeholder = 'Click to upload video',
maxSize = 15000000, // 15MB default
maxSize = 20000000, // 20MB default
},
onChange,
value,
Expand Down Expand Up @@ -171,7 +171,7 @@ const VideoUpload = forwardRef<HTMLInputElement, VideoUploadProps>(
console.log('⚠️ Animation file rejected:', { code, message });
if (code === 'file-too-large') {
setError(
`Animation file is too large. Max size is ${maxSize / 1000000}MB.`
`Animation file is too large. Max size is ${maxSize / 2000000}MB.` // 20MB
);
} else {
setError(message);
Expand Down
4 changes: 2 additions & 2 deletions packages/app/lib/actions/videoUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const videoUploadAction = async ({ data }: { data: FormData }) => {

return res;
} catch (e) {
console.error('Error uploading video action');
return '';
console.error('Error uploading video action:', e);
throw e;
}
};
2 changes: 1 addition & 1 deletion packages/server/src/middlewares/multer.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import multer from 'multer';
export const multerConfig = multer({
storage: multer.memoryStorage(),
limits: {
fileSize: 20 * 1024 * 1024, // 15MB limit
fileSize: 20 * 1024 * 1024, // 20MB limit
},
});

0 comments on commit 2595330

Please sign in to comment.