-
Notifications
You must be signed in to change notification settings - Fork 2
Profile picture uploading #41 #63
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?
Profile picture uploading #41 #63
Conversation
…on to extract Image data and update the previewImage
sundayezeilo
left a comment
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.
Looks good. There are a few minor comments to fix, though. Please also remember to link your ticket in all your future PRs. See this guide
| return await fetch(`/imageUpload`, fetchOptions) | ||
| .then((res) => res.json()) | ||
| .catch((err) => { | ||
| console.log('UPLOADIMAGE-ERROR: ', err); |
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.
You can use console.error for this log
| onSubmit={handleSubmit} | ||
| encType="multipart/form-data" | ||
| > | ||
| <input |
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.
Use MUI TextField for this one
| type="file" | ||
| onChange={handleChange} | ||
| /> | ||
| <label htmlFor="fileInput" className={classes.label}> |
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.
Use MUI InputLabel for this
| Upload a file from your device | ||
| </Button> | ||
| </label> | ||
| <button type="submit" className={classes.submitButton}></button> |
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.
Use MUI Button component for this one
| </form> | ||
| </Grid> | ||
| <Grid item container className={classes.deleteButtonContainer}> | ||
| {/*this is going to remove from the cloud*/} |
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.
Remove comment please
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| zIndex: -1, | ||
| // zIndex: -1, |
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.
Remove unused code line
…console.log to console.err
|
I've made the suggested changes above, in this commit 13f946a |
sundayezeilo
left a comment
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.
Nice job making the requested changes 👍
What this PR does (required):
profile-photopage, to cloudinary via theuploadImageAPI Call.Any information needed to test this feature (required):
localhost:3000, and try to upload a photo using the upload button on the profile photo page. Please DM me if you would like the credentials to do so.Screenshots / Videos (front-end only)