Tuesday 25 September 2012

File Application Programming Interface

 Web site is meant for sharing of the information. It is observed that lot of data is sent, received and shared through the Internet medium. There are different ways of sharing information over web, those are:

1.    Including it as Hypertext: Hypertext is the text included directly in the HTML format in the page code. Information here is visible to everyone who accesses the web.

2.    Mailing: This method allows the data to be sent as a part of mail. The information is private and is between sender and receiver.

3.    Sharing on Social networking site: This has emerged as easy way of sharing information with a group of known people. It ensures privacy as well as allows uploading files.

File sharing is one most necessary facility. It is utilized by large amount of people. This is done by using File Application Programming Interfaces also known as File API. They allow access to files on the local system. This is a kind of application that uses Java script to provide access to files. It has to be compatible with different browsers. Most common example of such application is FileReader. It is compatible with Chrome, Firefox, IE 10 and opera.

This application creates a file object every time it is activated. It provides interface for user to programmatically select the file on the local system. The application accesses the file data and thus displays the size of it. It is most commonly used for uploading images. An advance API will allow dragging and dropping of the files.

Programming such application can start with use of simple <INPUT> tag and using it with type attribute specified as file. Eg: <input type=”file”>. This is then further enhanced by adding different features. Dragging and dropping feature is possible with HTML5 where <input> tag is replaced with <div> tag.

No comments:

Post a Comment

No Spam please save your time we will remove it any way