-
Notifications
You must be signed in to change notification settings - Fork 10
Image validation and size optimization for Profile image upload from both front-end and back-end #513
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
Open
jacovkim
wants to merge
18
commits into
master
Choose a base branch
from
feat/profiles2024/images
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Image validation and size optimization for Profile image upload from both front-end and back-end #513
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ac8aec2
implemented backend logic for retrieving and updating a user profile
ElaineShu0312 35c2515
fixed the permissions so that there is separation of concerns, + fixe…
ElaineShu0312 33bc020
wrote tests for user.py and fixed bugs, passing all 10
ElaineShu0312 a48d202
fixed little bug in test
ElaineShu0312 cb4d2aa
dynamic user routing works now I think
ElaineShu0312 242c18c
finished profile form
ElaineShu0312 3e6d7f9
hopefully resolved one of the merge errors
ElaineShu0312 bbc335f
created AWS bucket and tried to link it to backend
ElaineShu0312 2c5efa1
configured settings for Image bucket
ElaineShu0312 52f828e
clean slate
ElaineShu0312 2b3573d
created component and view for testing the upload image pipeline
ElaineShu0312 7ab25be
trying to figure out image upload json error
ElaineShu0312 c8bd6ff
pillow image validation
ElaineShu0312 8bdfc37
Fixed image validation with other minor fixes
jacovkim aa2e655
Added UI features on section enrollment page (#509)
edwardneo 9a79f9b
Added CSS
jacovkim 7d03638
Added preferred name, overhauled profile upload UI, fixed profile que…
edwardneoprime b576212
Completed profiles -- (re)connected S3 bucket, added signed URLs, cre…
edwardneoprime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ import { emptyRoles, Roles } from "../utils/user"; | |
import CourseMenu from "./CourseMenu"; | ||
import Home from "./Home"; | ||
import Policies from "./Policies"; | ||
import UserProfile from "./UserProfile"; | ||
import { DataExport } from "./data_export/DataExport"; | ||
import { EnrollmentMatcher } from "./enrollment_automation/EnrollmentMatcher"; | ||
import { Resources } from "./resource_aggregation/Resources"; | ||
|
@@ -42,6 +43,13 @@ const App = () => { | |
<Route path="matcher/*" element={<EnrollmentMatcher />} /> | ||
<Route path="policies/*" element={<Policies />} /> | ||
<Route path="export/*" element={<DataExport />} /> | ||
{ | ||
// TODO: add route for profiles (/profile/:id/* element = {UserProfile}) | ||
// TODO: add route for your own profile /profile/* | ||
// reference Section | ||
} | ||
Comment on lines
+46
to
+50
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. TODOs leftover that should be deleted |
||
<Route path="profile/*" element={<UserProfile />} /> | ||
<Route path="profile/:id/*" element={<UserProfile />} /> | ||
<Route path="*" element={<NotFound />} /> | ||
</Route> | ||
</Routes> | ||
|
@@ -80,7 +88,7 @@ function Header(): React.ReactElement { | |
}; | ||
|
||
/** | ||
* Helper function to determine class name for the home NavLInk component; | ||
* Helper function to determine class name for the home NavLnk component; | ||
* is always active unless we're in another tab. | ||
*/ | ||
const homeNavlinkClass = () => { | ||
|
@@ -141,6 +149,9 @@ function Header(): React.ReactElement { | |
<NavLink to="/policies" className={navlinkClassSubtitle}> | ||
<h3 className="site-subtitle">Policies</h3> | ||
</NavLink> | ||
<NavLink to="/profile" className={navlinkClassSubtitle}> | ||
<h3 className="site-subtitle">Profile</h3> | ||
</NavLink> | ||
<a id="logout-btn" href="#" onClick={logout} title="Log out"> | ||
<LogOutIcon className="icon" /> | ||
</a> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to be an issue? Not sure when these methods are called.