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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user