I've been through a few similar posts here, but cannot seem to find what I need.
I have a web application (HTML5 and Javascript), which has a picture taking function and I need it to then send it to some form of storage or database (preferably something like .json). I am quite new to web development so I am not very familiar with how exactly this would work.
So far I have the following code, which takes the picture and sends it using XHR.
<input id="objPic" type="file" accept="image/*" capture="camera">
<script>
var newImage = document.getElementById('objPic');
function sendPic()
{
var file = fileInput.files[0];
var xhr = new XMLHttpRequest();
xhr.open('POST', '/upload/path', true);
xhr.send(file);
}
myInput.addEventListener('change', sendPic, false);
</script>
My Question is about how/where to send it (what do I put as a path)? What is the best way to store the images?
My webpage is using github as a host (if that is relevant in any way).