Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1d30e43
Fix sponsor image to fit within container; partial circle shape imple…
fisayoadabs Jan 16, 2025
cf49901
Hmt 99/login redirect (#169)
anthonyych4n Jan 16, 2025
889c7c7
Merge branch 'main' of https://github.com/Code-the-Change-YYC/hackath…
fisayoadabs Feb 5, 2025
169808d
Using base64 and browser compression profile Image is stored in database
fisayoadabs Feb 10, 2025
1875a03
Forgot to update the initialData with profilePicture
fisayoadabs Feb 10, 2025
f336426
I do not have access to s3 but this should work if you try it burton
fisayoadabs Feb 24, 2025
52ab860
Merge branch 'main' of https://github.com/Code-the-Change-YYC/hackath…
fisayoadabs Mar 29, 2025
f1e3254
Added some more config and permissions but it seems as though I still…
fisayoadabs Mar 31, 2025
52457a0
feat: Got the upload to work by using public and linking the identity…
fisayoadabs May 20, 2025
31aaf34
Merge branch 'main' of https://github.com/Code-the-Change-YYC/hackath…
fisayoadabs May 20, 2025
707bf2a
fix: replace useEffect with useQuery and require image to be png(this…
fisayoadabs Jun 5, 2025
1b28df3
fix: changed styling and removed unused code
fisayoadabs Jun 10, 2025
61e7176
Merge branch 'main' of https://github.com/Code-the-Change-YYC/hackath…
fisayoadabs Jun 10, 2025
e43d73e
Merge branch 'main' into HMT-112-profile-picture-storage
fisayoadabs Jun 10, 2025
135a3c2
reinstalled node modules which updated packages
fisayoadabs Jul 2, 2025
c00f76d
downgraded react and next
fisayoadabs Jul 3, 2025
5168423
feat: updated next and react to latest version
fisayoadabs Jul 9, 2025
1dcf8e4
Merge branch 'main' of https://github.com/Code-the-Change-YYC/hackath…
fisayoadabs Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions amplify/auth/PostConfirmation/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const handler: PostConfirmationTriggerHandler = async (event) => {
const cognitoGroupResponse = await cognitoClient.send(command);

const DDBResponse = await dataClient.models.User.create({
profilePicture: "",
firstName: "",
lastName: "",
role: "Participant",
Expand Down
3 changes: 3 additions & 0 deletions amplify/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ import { auth } from "@/amplify/auth/resource";
import { data } from "@/amplify/data/resource";
import { defineBackend } from "@aws-amplify/backend";

import { storage } from "./storage/resource";

const backend = defineBackend({
auth,
data,
storage,
});

// Cognito Email Overrides
Expand Down
1 change: 1 addition & 0 deletions amplify/data/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const schema = a
User: a
.model({
id: a.id().required(),
profilePicture: a.string(),
firstName: a.string(),
lastName: a.string(),
role: a
Expand Down
24 changes: 24 additions & 0 deletions amplify/storage/resource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { defineStorage } from "@aws-amplify/backend";

export const storage = defineStorage({
name: "profileImageStorage",
access: (allow) => ({
"public/*": [
allow.authenticated.to(["read", "write", "delete"]),
allow.groups(["Participant"]).to(["read", "write"]),
allow.groups(["Judge"]).to(["read", "write", "delete"]),
allow.groups(["Admin"]).to(["read", "write", "delete"]),
],
"private/${user}/profilePicture/*": [
// Allow users to manage their own profile pictures
allow.authenticated.to(["read", "write", "delete"]),
allow.groups(["Admin"]).to(["read", "write", "delete"]),
],
"media/*": [
allow.authenticated.to(["read", "write", "delete"]),
allow.groups(["Participant"]).to(["read", "write"]),
allow.groups(["Judge"]).to(["read", "write", "delete"]),
allow.groups(["Admin"]).to(["read", "write", "delete"]),
],
}),
});
8 changes: 7 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
domains: ["images.ctfassets.net"],
domains: ["images.ctfassets.net", "s3.ca-central-1.amazonaws.com"],
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
};

Expand Down
Loading