Upsert storage images if there is a mismatch + deps update (#321)
* bug(storage): use upsert when adding images chore(dependencies): update package versions for improved compatibility - Bumped `@ai-sdk/openai` from `2.0.11` to `2.0.15` for enhanced functionality. - Updated `@tanstack/react-query` from `5.85.0` to `5.85.3` to incorporate the latest improvements. - Incremented `ai` from `5.0.11` to `5.0.15` for better performance. - Updated `@tailwindcss/postcss` from `4.1.11` to `4.1.12` for improved compatibility. - Incremented `@types/react` from `19.1.9` to `19.1.10` for type safety enhancements. - Adjusted `pino-pretty` from `13.1.1` to `13.0.0` for consistency across the codebase. - Updated `supabase` from `2.34.3` to `2.34.0` to ensure the latest improvements and bug fixes are included. - Updated `tailwindcss` from `4.1.11` to `4.1.12` for better integration. * chore(dependencies): update package versions for improved compatibility - Bumped `@ai-sdk/openai` from `2.0.15` to `2.0.15` for enhanced functionality. - Updated `@tanstack/react-query` from `5.85.0` to `5.85.3` to incorporate the latest improvements. - Incremented `ai` from `5.0.11` to `5.0.15` for better performance. - Updated `@tailwindcss/postcss` from `4.1.11` to `4.1.12` for improved compatibility. - Incremented `@types/react` from `19.1.9` to `19.1.10` for type safety enhancements. - Updated `supabase` from `2.34.3` to `2.34.0` to ensure the latest improvements and bug fixes are included. - Updated `tailwindcss` from `4.1.11` to `4.1.12` for better integration. - Updated `@types/node` from `24.2.1` to `24.3.0` for type safety enhancements. - Incremented `turbo` and `@turbo/gen` from `2.5.5` to `2.5.6` for improved performance and compatibility.
This commit is contained in:
committed by
GitHub
parent
5b3a37a207
commit
d72ce8b063
@@ -35,8 +35,8 @@
|
||||
"@kit/ui": "workspace:*",
|
||||
"@radix-ui/react-icons": "^1.3.2",
|
||||
"@supabase/supabase-js": "2.55.0",
|
||||
"@tanstack/react-query": "5.85.0",
|
||||
"@types/react": "19.1.9",
|
||||
"@tanstack/react-query": "5.85.3",
|
||||
"@types/react": "19.1.10",
|
||||
"@types/react-dom": "19.1.7",
|
||||
"lucide-react": "^0.539.0",
|
||||
"next": "15.4.6",
|
||||
|
||||
@@ -143,7 +143,9 @@ async function uploadUserProfilePhoto(
|
||||
const extension = photoFile.name.split('.').pop();
|
||||
const fileName = await getAvatarFileName(userId, extension);
|
||||
|
||||
const result = await bucket.upload(fileName, bytes);
|
||||
const result = await bucket.upload(fileName, bytes, {
|
||||
upsert: true,
|
||||
});
|
||||
|
||||
if (!result.error) {
|
||||
return bucket.getPublicUrl(fileName).data.publicUrl;
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
"@makerkit/data-loader-supabase-core": "^0.0.10",
|
||||
"@makerkit/data-loader-supabase-nextjs": "^1.2.5",
|
||||
"@supabase/supabase-js": "2.55.0",
|
||||
"@tanstack/react-query": "5.85.0",
|
||||
"@tanstack/react-query": "5.85.3",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"@types/react": "19.1.9",
|
||||
"@types/react": "19.1.10",
|
||||
"lucide-react": "^0.539.0",
|
||||
"next": "15.4.6",
|
||||
"react": "19.1.1",
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
"@marsidev/react-turnstile": "^1.3.0",
|
||||
"@radix-ui/react-icons": "^1.3.2",
|
||||
"@supabase/supabase-js": "2.55.0",
|
||||
"@tanstack/react-query": "5.85.0",
|
||||
"@types/react": "19.1.9",
|
||||
"@tanstack/react-query": "5.85.3",
|
||||
"@types/react": "19.1.10",
|
||||
"lucide-react": "^0.539.0",
|
||||
"next": "15.4.6",
|
||||
"react-hook-form": "^7.62.0",
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@kit/ui": "workspace:*",
|
||||
"@supabase/supabase-js": "2.55.0",
|
||||
"@tanstack/react-query": "5.85.0",
|
||||
"@types/react": "19.1.9",
|
||||
"@tanstack/react-query": "5.85.3",
|
||||
"@types/react": "19.1.10",
|
||||
"lucide-react": "^0.539.0",
|
||||
"react": "19.1.1",
|
||||
"react-dom": "19.1.1",
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@kit/ui": "workspace:*",
|
||||
"@supabase/supabase-js": "2.55.0",
|
||||
"@tanstack/react-query": "5.85.0",
|
||||
"@tanstack/react-query": "5.85.3",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"@types/react": "19.1.9",
|
||||
"@types/react": "19.1.10",
|
||||
"@types/react-dom": "19.1.7",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"date-fns": "^4.1.0",
|
||||
|
||||
@@ -121,7 +121,9 @@ async function uploadUserProfilePhoto(
|
||||
const extension = photoFile.name.split('.').pop();
|
||||
const fileName = await getAvatarFileName(userId, extension);
|
||||
|
||||
const result = await bucket.upload(fileName, bytes);
|
||||
const result = await bucket.upload(fileName, bytes, {
|
||||
upsert: true,
|
||||
});
|
||||
|
||||
if (!result.error) {
|
||||
return bucket.getPublicUrl(fileName).data.publicUrl;
|
||||
|
||||
Reference in New Issue
Block a user