Home | Blog

Web Demos
Gmail Type Attachment Clone

Google and its wide range of web applications have simple changed the way we used to look at internet. Be it the revolutionary fast Google search engine or mail by Google i.e Gmail. You will find enormous amount of threads and forums discussing How do google achieve doing XYZ? or How do they make it happen fast and efficiently?.

One of the most talked about thing about Gmail is probably how do they achieve making Gmail so simple, convinient, sober, fast and easy. One of the Gmail's feature which contribute hugely in making it easier and faster for users is: Its ability to attach your files while you are writing your mail.

Now without much of a talking, lets first see a demo of how it works:

Attach a file

Currently, I have allowed upto 5 uploads, a maximum file size of 100 Kb and gif, jpg, png file formats only. You can make appropriate changes for the same in upload.php.

This is achieved by using an iframe which contains your server side script responsible for handling uploads. As soon as the user select a file to upload, the upload form gets submitted to upload.php, which lies in an iframe. Hence at no point does the user leaves the page and still he gets his file uploaded. Find attached below all the files you need to implement this on your server. Just unzip the file on your server, and you are ready. All the uploaded files will go in th upload folder by default. You may change that in upload.php.

Download the zip folder of all the source files from here.

Use my blog here to post any comment or suggestions and feel free to contact me for any additional queries.

Creative Commons License
This work is licensed under a
Creative Commons Attribution-Share Alike 2.5 India License.