-
Notifications
You must be signed in to change notification settings - Fork 0
HMT-112-profile-picture-storage #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
1d30e43
cf49901
889c7c7
169808d
1875a03
f336426
52ab860
f1e3254
52457a0
31aaf34
707bf2a
1b28df3
61e7176
e43d73e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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"]), | ||
fisayoadabs marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you resolved these, but I still don't see anywhere that you are using these... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ye mb i reverted this file on commit. Whoops |
||
], | ||
}), | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
images: { | ||
domains: ["images.ctfassets.net"], | ||
domains: [ | ||
"images.ctfassets.net", | ||
"amplify-hackathonmanageme-profileimagestoragebucke-qigdi1utj018.s3.ca-central-1.amazonaws.com", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have to make this global, because this bucket is specific to you only https://nextjs.org/docs/messages/next-image-unconfigured-host you might have to upgrade next version to latest, which should be fine |
||
], | ||
}, | ||
}; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.