comp426-2023-spring / a99-TeamNoTeam

GNU General Public License v3.0
0 stars 0 forks source link

Setup photo upload #42

Closed baileymeredith closed 1 year ago

baileymeredith commented 1 year ago

Some Notes for this PR: The file upload in post-review.ejs works and is linked to the database!

Here's how I ended up implementing the upload functionality:

  1. I got the image buffer from the form in post-reviews.ejs and saved it to an /images folder in public
  2. I used the image buffer to write a new .jpg file into images folder
  3. Edited the path information so that the frontend is able to access the image just by saying something along these lines from the database: res.render('image', {image: response.photo})

Future Implementation: