arrow_back Back to Tickets

Ticket #c213d2

completed

Problem

profile picture uploading

Creator

marcus

Priority

3

Urgent

urgent

Important

important

Project Name

zfrika

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

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/

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)

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, ... }

Ticket Information

Ticket ID: 690e2367437ec12426c213d2
Date Initiated: 11/3/2025, 6:48:00 PM
Date Resolved: 1/22/2026, 8:22:00 AM
Status: completed
Urgent: urgent
Important: important
Created: 11/7/2025, 8:50:47 AM
Last Updated: 1/29/2026, 8:22:28 AM