FormData附加到$ _POST而不是$ _FILES?

I'm trying to implement an upload routine for huge files, for this I'm chunking the file and send chunk by chunk to server so far so good.

Now to identify the chunk-parts, I'm trying to send some more information than the pure filepart in FormData.

var xhr = new XMLHttpRequest();
xhr.open("POST", 'upload.php', true);

var formData = new FormData();
formData.append("chunkpart", blob); // blob is Blob() or BlobBuilder
formData.append("chunkNumber", sendCount); // sendCount is an integer
formData.append("maxChunks", Math.ceil(maxChunks)); // maxChunks is a floatingpoint
formData.append("fileID", fileID); // fileID is an almost unique string
xhr.send(formData);

On the php side the chunkpart is found in $_FILES however chunkNumber, maxChunks and fileID are found in $_POST.

My question here: Am I doing something wrong or did I just misunderstood how FormData works and how can I get it work like I expected?

This is simply how posted content works with BLOB data. It gets uploaded as a "file" in a multipart form post. In PHP this type of form data is in the $_FILES variable and not the $_POST.

Is there some reason that you can't grab data from both $_POST and $_FILES? I do that regularly when processing posting form content that includes files/images.