Skip to content

Commit

Permalink
Fix profile image pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciaahuang committed Oct 5, 2024
1 parent e6fe838 commit 9cb2e40
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const UserProfileImage: React.FC = () => {
if (process.env.NODE_ENV === 'test') {
return;
}
ImagesAPI.getImage(userInfo ? userInfo.email : '').then((url: string) => {
ImagesAPI.getImage(`images/${userInfo ? userInfo.netid : ''}`).then((url: string) => {
setProfilePhoto(url);
});
}, [userInfo]);
Expand All @@ -31,7 +31,7 @@ const UserProfileImage: React.FC = () => {
.then((res) => res.blob())
.then((blob) => {
imageURL = window.URL.createObjectURL(blob);
ImagesAPI.uploadImage(blob, `image-signed-url/${userInfo ? userInfo.email : ''}`);
ImagesAPI.uploadImage(blob, `image-signed-url/images/${userInfo ? userInfo.netid : ''}`);
setProfilePhoto(imageURL);
});
}
Expand Down

0 comments on commit 9cb2e40

Please sign in to comment.