Single file upload system and multiple file uploading scripts just served 100 thousand views individually since I posted them, I cannot be happier than this. I did receive a few comments and PM to give a shot on Upload with AJAX, so here it is File Upload with Ajax
This is the basic AJAX file uploading to demonstrate how uploading can be done on AJAX, I will come up with advance and multiple uploading script soon.
The concept
Unlike the ordinary file upload where you submit the file and its processed, most of the action happens in back-end and the front end works are completed by Web Browsers, but in AJAX file uploads is of 2 parts
- Client Side code
- Server Side code
You need to build both, In client side you gonna have to get the file packed it into a package to be sent over the internet to the server. In the Server side you need to have a system to receive the POST request & process the receiving file and save it. For server side I’m using my previous script Single file upload system, the code is simple and the article has good descriptions of how it works.
I’m using Jquery for the making the selection area and changing the message in the front end part, ( I was lazy) you can do these tasks using document.querySelector()
.
Let’s get started.
The HTML
All you need is a