Article 6D36E PHP/AJAX - Any way to Upload or transfer files from Ajax to folder

PHP/AJAX - Any way to Upload or transfer files from Ajax to folder

by
pizzipie
from LinuxQuestions.org on (#6D36E)
I have an object containing image files(jpg, png, etc) that I send via AJAX to a program that, hopefully, can upload all the files to a target folder. All I can find in any documentation is that you have to have a "multipart/form-data" form type="file" to submit one file at a time via submitting. I am trying to process 7000 files(re-naming, re-sizing etc) so this obviously will not work.

I tried to copy() the files but that doesn't work.

Thanks in advance for help in trying to make this work.

R

Code:
$.ajax({
type: "POST",
url: "upload3.php",
data: { ajaxArr }
});
// ==============================

//upload3.php

$imageArr=$_POST['ajaxArr'];

for($i=0; $i<count($imageArr); $i++) {
echo $i.". ".$imageArr[$i]."<br>";
}
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments