feat: s3 avatar uploads
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { env } from "~/env";
|
||||
|
||||
export const formatToArray = (
|
||||
value: string | string[] | undefined,
|
||||
): string[] => {
|
||||
@@ -42,3 +44,7 @@ export const formatMemberDisplayName = (
|
||||
|
||||
return localPart.replace(/[_-]/g, ".");
|
||||
};
|
||||
|
||||
export const getAvatarUrl = (key: string) => {
|
||||
return `${env.NEXT_PUBLIC_STORAGE_URL}/${env.NEXT_PUBLIC_AVATAR_BUCKET_NAME}/${key}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user