Closed andheiberg closed 10 years ago
Tried to figure it out my self, by doing something like:
if (substr(strrchr($headers['range'], '-'), 1) == $file['size'])
{
// it's full
}
But the ranges are off by one? I dumped the two and one is one bit larger than the other? Is this consistent?
It's been a while since I implemented that but I remember that we made a "completed" callback that is fired when a file is fully uploaded (including the case where it's uploaded by chunks).
Yeah, seems to be so. Usage is in the README, goes as follows:
$fileupload->addCallback('completed', function(FileUpload\File $file) {
// Whoosh!
});
I think the resulting file object after processing should contain information about wether the last chunk has been uploaded.