adamFittlerGit / stormdrain

My personal blog website I can use to track my personal progress and ideas as well as my projects and think I am learning
https://stormdrain-eight.vercel.app
0 stars 0 forks source link

Image upload broken #1

Open adamFittlerGit opened 1 week ago

adamFittlerGit commented 1 week ago

The image upload feature is not working properly it is uploading a file but not an image for the new image uplaods need to resolve this asap and fix images in db to avoid UI looking rubbish. Maybe need to check file before uploading

adamFittlerGit commented 1 week ago

I have figured out what is going on here, so when the database upload logic was all moved to the backend I forgot that the files are stringified and then sent so we need to find a way to convert the image files to json format, send them to the backend and then reconstruct them as upload them to supabase storage. For now the work around will be to just not upload any files for a bit and that should be a solve, but this will require me to make an important design decision about the website. I will need to research the options and figure out a solution but at least I now understand the problem better.

adamFittlerGit commented 1 week ago

After more research I need to look at the javascript formData object and library which can handle a lot of this for me in order to make the data transfer to the backend smooth, it will handle all of the serialisation and keep all of the file data intact throughout the file transfer!