Storing a screenshot and uploading it from a browser-based app to a web server

So I’m just looking for a quick primer on how I can upload a screenshot to a web server from a browser-based app. Since I can’t save the file locally and then upload it, do I need to store it in a texture variable? I’m a little confused on the basics of this but I’m only looking to get pointed in the right direction. Everything I’ve researched online addresses using a string variable that points to the file location locally, but this won’t work for a browser based app, correct? Just looking for some guidance on how to start building a POC for this. Thanks for the help.

What I know: I can take the screenshot (but right now I only know how to save it to locally) I can upload a file (but only from a local path)

Big question: How do I do I save the screenshot only in memory? Not sure if that’s even the correct question but I hope someone knows what I’m trying to get at.

Ultimately what I want to do is take a screenshot and then save it directly to a mysql server.

There’s a few ways of taking a screengrab here: (file/texture etc…)

Once you have that you can upload using the WWW post function which takes a byte array as post data. (you can get your texture data as a raw byte[ ]). On your web server side you would need to take that byte array and save it out as a png or jpg.