arrow_back
Back to Tickets
Edit Trouble Ticket
Update the ticket information below
Date Initiated
*
Status
*
Open
Pending
Completed
Terminated
Creator
*
marcus
Priority
*
3
Urgent
Select urgency...
Urgent
Not Urgent
Important
Select importance...
Important
Not Important
Project Name
*
zfrika
Problem
*
profile picture uploading
Question
does save save username button work on a form? Q2: what was the previous page that went to profile page? A2: route GET userhomepage/datatoken , route GET profile/datatoken. ---- Q3: which page calls profile page? A3: POST /app2/login GET /app2/enhance-profile/datatoken GET /app2/enhance-profile/datatoken POST /app2/editprofilepicture 404 _------------ Q4: How does the page currently update profile information? A4: GET / 200 GET /login 200 POST /login 200 GET /profile/datatoken GET /editprofile/datatoken
Root Cause
Notes
use editusername.ejs as an example of how to move data into the form. use save Username button as an example. implement the lessons learned form upload gallery /playground/picture_upload/
Strategy
Helpful People
Helpful Links
Diagram
https://app.diagrams.net/#D254kenya%20website.drawio#%7B%22pageId%22%3A%22o_YwohmaNIowPl5twEu3%22%7D
Previous Steps
id=“update-picture-overlay" const overlay = document.getElementById(‘update-picture-overlay saveProfilePicture() { is the best place to execute the update the dbase. run a post route for picture. build a form similar to editusername.ejs in create a seperate page. or can you turn the pop up into a form? can a <form> exist inside a <div>
Next Steps
who ever called the form has to pass BASE_URL PATH. who called the form for editusername.ejs? check the localstorage for the value saved for picture. and compare that to the value in the pm2 logs that was in the route. check in the req.list what value was passed in the route. first create a picture to pull fromthe database. add profilepicture to database. i added profilepicture to the database colleciton users for kkironyo@gmail.com who passes datatoken to route post /editprofilepicture? in enhance-profile.ejs , line 662, profileManager.saveProfilePicture() id = picture-url-input we never set in localstorage (user_profile)
Solution
Insight
important to test the upload with a curl command before trying to complicate things and upload pictures. #!/bin/bash echo "starting my script" # Health is GET curl -v http://localhost/healthz # expect: ok echo " start upload testing" # Upload is POST multipart; NOTE the @ curl -F "image=@coffee.jpg" -F "title=Test" http://localhost/upload # expect JSON: { "ok": true, ... }
Date Resolved
save
Update Ticket
Cancel