kms
Friday, 2025-02-07, 2:17 PM

අන්තර්ජලය හරහා මුදල් සෙවීමේ නිවරදිම ක්‍රම වේදයන් 

අන්තර්ජලය හරහා මුදල් සෙවීමේ නිවරදිම ක්‍රම වේදයන් මේ සමග අමුන ඈති ලින්ක් 1 න් මුලින්ම ඔබගේ ගිනුම මුලින්ම සකසා ගන්න

     
     
     

 

kms
Or alternatively, to capture video using the device's local video camera: EXAMPLE 2
Or alternatively, to capture audio using the device's local microphone: EXAMPLE 3
For more advanced use cases, specify the capture attribute in markup: EXAMPLE 4 And handle the file upload in script via XMLHttpRequest: EXAMPLE 5 var input = document.querySelector('input[type=file]'); // see Example 4 input.onchange = function () { var file = input.files[0]; upload(file); drawOnCanvas(file); // see Example 6 displayAsImage(file); // see Example 7 }; function upload(file) { var form = new FormData(), xhr = new XMLHttpRequest(); form.append('image', file); xhr.open('post', 'server.php', true); xhr.send(form); } The image can also be displayed on the client-side without uploading it e.g. for client-side image editing purposes, using the FileReader and a canvas element: EXAMPLE 6 function drawOnCanvas(file) { var reader = new FileReader(); reader.onload = function (e) { var dataURL = e.target.result, c = document.querySelector('canvas'), // see Example 4 ctx = c.getContext('2d'), img = new Image(); img.onload = function() { c.width = img.width; c.height = img.height; ctx.drawImage(img, 0, 0); }; img.src = dataURL; }; reader.readAsDataURL(file); } Or alternatively, to just display the image, using the createObjectURL() method and an img element: EXAMPLE 7 function displayAsImage(file) { var imgURL = URL.createObjectURL(file), img = document.createElement('img'); img.onload = function() { URL.revokeObjectURL(imgURL); }; img.src = imgURL; document.body.appendChild(img);