Too Long; Didn't Read
Use Astro to send data to and from your server using FormData]instead of using Json. Instead of using JSON, you'd use 'FormData' to send files natively. There are two ways to upload files in Astro, the easy way (using Astro's file routes to handle POST requests and deal with the file upload that way) or the hard way using (express and multerjs to setup a nodejs server with a Astrojs middleware running on top, to setup file uploads).