Hi,
I use Ubuntu 20.04.
I have thousands of old photo images located on CD's and external hard drives. I want to organize and re-size these.
I choose image files from a source directory via SelectBox. I use AJAX to send the selected images to a PHP program upload3.php which, hopefully, will be able to upload the files to another target directory. I get the { data } sent to upload3.php and I am stuck. I can't copy the files to the target directory. How do I upload these files?? Using a form to upload the files one by one is out of the question!! Thanks in advance for help. R

I use Ubuntu 20.04.
I have thousands of old photo images located on CD's and external hard drives. I want to organize and re-size these.
I choose image files from a source directory via SelectBox. I use AJAX to send the selected images to a PHP program upload3.php which, hopefully, will be able to upload the files to another target directory. I get the { data } sent to upload3.php and I am stuck. I can't copy the files to the target directory. How do I upload these files?? Using a form to upload the files one by one is out of the question!! Thanks in advance for help. R

Code:
<script type="text/javascript" >
$(document).ready(function(){
$("form").submit(function(){
var myselected= $('#images').val();
const ajaxArr=Object.values(myselected);
for (var i=0; i<ajaxArr.length; i++) {
document.writeln(ajaxArr[i]+"<br>");
}
$.ajax({
type: "POST",
url: "upload3.php",
data: { ajaxArr }
});
})
}) // ready
</script>