One things you may encounter as a web developer is to write a code that uploads a file from the end-user's browser (the front-end) to the application server (back-end).
These classes provides support for various customizations:
- maximum chunk size (like 1MiB)
- sending interval between chunks (like 20ms)
- maximum parallel chunks (like 10 chunks at a time)
- events that are triggered on starting a new chunk upload, on chunk sent, on upload progress, on upload error or on abort.
- it also provides support for sending a security nonce that the server script may validate it later.
The project hosted at GitHub provides also a demo implementation (see index.html) and a back-end demo script (see upload.php). Please note that you can find the classes full documentation on the project's GitHub repository.
Below it's a short diagram of how these files are related:
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.