{"id":15838,"date":"2017-01-23T16:15:29","date_gmt":"2017-01-23T14:15:29","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=15838"},"modified":"2017-12-19T13:21:25","modified_gmt":"2017-12-19T11:21:25","slug":"html5-file-api","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/","title":{"rendered":"HTML5 File API"},"content":{"rendered":"<p>With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite difficult or outrightly impossible to do on the browser, possible.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;tgm4cmEWcKUikZNn&#8217;]<br \/>\n&nbsp;<br \/>\nIn this example we are going to demystify one of the features of HTML5-The file API. For this example we will use:<\/p>\n<ul>\n<li>A computer with a modern browser installed.<\/li>\n<li>notepad++.<\/li>\n<\/ul>\n<h2>1. Getting Started<\/h2>\n<p>HTML5 File API comes with a lot of possibilities. Operations that were once only possible on native applications, are now a possibility on both desktop and mobile browsers.<br \/>\nThe HTML5 File API allows you to create applications that let the user interact with files locally. Basically, you can load files and render them in the browser without actually having to upload the files. It is now possible to display thumbnails of images on the user hard drive in a browser.<\/p>\n<h3>1.1 Using The File API<\/h3>\n<p>Adding a file chooser dialog to a web app is as simple as adding the line below to your HTML.<\/p>\n<pre class=\"brush:bash\">&lt; input type =file id=pick &gt;\r\n<\/pre>\n<p>The input type file is used to add a file chooser dialog to HTML. The attribute id is used to identify an HTML element in a document. To work with files locally, their are three objects we would need to work with.<\/p>\n<ul>\n<li>File: A single file object with some metadata. It represents a file object on the system.<\/li>\n<li>FileList: Simply a list of file objects. For instance, a list of files inside a directory.<\/li>\n<li>FileReader: An object to read files with a number of methods and event handlers to interact with them.<\/li>\n<\/ul>\n<p>If a user selects more than one file, the filelist object gives us access to each file the user selected. To allow the user select multiple files, add <code>mutiple<\/code> to the file chooser signature.<\/p>\n<pre class=\"brush:bash\">&lt; input type =file multiple id=pick &gt;\r\n<\/pre>\n<p>We need to register an onchange listener to our file chooser.<\/p>\n<pre class=\"brush:bash\">&lt; input type =file multiple id=pick onchange=\"change(event)\" &gt;\r\n<\/pre>\n<p>Complete code below<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush:html\">&lt;!DOCTYPE html&gt; \r\n&lt;html lang=en&gt;\r\n\t&lt;head&gt;\r\n\t&lt;style&gt;\r\n\thtml, body{\r\n\twidth:100%;\r\n\theight:100%;\r\n\tmargin:0%;\r\n\tfont-family:\"helvetica\",\"verdana\",\"calibri\", \"san serif\";\r\n\toverflow:visible;\r\n\tpadding:0%;\r\n\tborder:0%;\r\n\t}\r\n#pick{\r\nmargin:10px;\r\n}\r\n\t&lt;\/style&gt;\r\n\t \t\t&lt;meta charset=\"utf-8\" \/&gt;\r\n\t\t&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi\"\/&gt;\r\n\t\r\n\t&lt;title&gt; \r\nHtml5 Semantic Elements Example\r\n&lt;\/title&gt;\r\n\t&lt;style&gt;\r\n\r\n\r\n&lt;\/style&gt;\r\n\t&lt;\/head&gt;\r\n\t&lt;body&gt;\r\n&lt;script&gt;\r\nfunction change(){\r\nvar p=document.getElementById(\"pick\")\r\nvar p1=p.files;\r\nalert(p1.length+ \" files choosen\");\r\n\r\n}\r\n&lt;\/script&gt;\r\n&lt;p&gt;\r\n&lt;input type =file multiple id=pick onchange=\"change()\" &gt;\r\n&lt;\/p&gt;\r\n\r\n\t&lt;\/body&gt;\r\n\t&lt;\/html&gt;\r\n<\/pre>\n<p>In line 39 we create the file chooser and register an event listener. We also add the attribute <code>multiple<\/code> to the tag, so as to allow a user select more than one file. When an <code>onchange <\/code> event occurs the function<code> change <\/code> is called. In the <code>change<\/code> function we alert the the number of files that was selected.<br \/>\nIf you want the user to select only one file, just remove the attribute <code>multiple <\/code> from the file chooser tag or run the code below.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index2.html<\/em><\/span><\/p>\n<pre class=\"brush:html\">&lt;!DOCTYPE html&gt; \r\n&lt;html lang=en&gt;\r\n\t&lt;head&gt;\r\n\t&lt;style&gt;\r\n\thtml, body{\r\n\twidth:100%;\r\n\theight:100%;\r\n\tmargin:0%;\r\n\tfont-family:\"helvetica\",\"verdana\",\"calibri\", \"san serif\";\r\n\toverflow:visible;\r\n\tpadding:0%;\r\n\tborder:0%;\r\n\t}\r\n#pick{\r\nmargin:10px;\r\n}\r\n\t&lt;\/style&gt;\r\n\t \t\t&lt;meta charset=\"utf-8\" \/&gt;\r\n\t\t&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi\"\/&gt;\r\n\t\r\n\t&lt;title&gt; \r\nHtml5 Semantic Elements Example\r\n&lt;\/title&gt;\r\n\r\n\t&lt;\/head&gt;\r\n\t&lt;body&gt;\r\n&lt;script&gt;\r\nfunction change(){\r\nvar p=document.getElementById(\"pick\")\r\nvar p1=p.files;\r\nalert(p1.length+ \" files choosen\");\r\n\r\n}\r\n&lt;\/script&gt;\r\n&lt;p&gt;\r\n&lt;input type =file id=pick onchange=\"change()\" &gt;\r\n&lt;\/p&gt;\r\n\r\n\t&lt;\/body&gt;\r\n\t&lt;\/html&gt;\r\n\r\n<\/pre>\n<h3>1.2 Handling Multiple Files<\/h3>\n<p>You can easily loop through the FileList to access each file object.<\/p>\n<pre class=\"brush:bash\">for (var i = 0; i&lt;files.length; i++) { \r\nvar file = files[i]; \r\n\/\/where files represents the FileList object.\r\n }\r\n\r\n<\/pre>\n<p>There are three attributes provided by the\u00a0File object that contain useful data about the file.<\/p>\n<ul>\n<li>name: The file&#8217;s name as a read-only string. This is just the file name, and does not include any path information.<\/li>\n<li>size: The size of the file in bytes.<\/li>\n<li>MIME: The MIME type of the file as a read-only string or\u00a0an empty string (&#8220;&#8221;\u00a0), if the type couldn&#8217;t be determined.<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><em>index3.html<\/em><\/span><\/p>\n<pre class=\"brush:html\">&lt;!DOCTYPE html&gt; \r\n&lt;html lang=en&gt;\r\n\t&lt;head&gt;\r\n\t&lt;style&gt;\r\n\thtml, body{\r\n\twidth:100%;\r\n\theight:100%;\r\n\tmargin:0%;\r\n\tfont-family:\"helvetica\",\"verdana\",\"calibri\", \"san serif\";\r\n\toverflow:visible;\r\n\tpadding:0%;\r\n\tborder:0%;\r\n\t}\r\n#pick{\r\nmargin:10px;\r\n}\r\n\t&lt;\/style&gt;\r\n\t \t\t&lt;meta charset=\"utf-8\" \/&gt;\r\n\t\t&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi\"\/&gt;\r\n\t\r\n\t&lt;title&gt; \r\nHtml5 Semantic Elements Example\r\n&lt;\/title&gt;\r\n\r\n\t&lt;\/head&gt;\r\n\t&lt;body&gt;\r\n&lt;script&gt;\r\nfunction change(){\r\nvar p=document.getElementById(\"pick\")\r\nvar p1=p.files;\r\nvar c=document.getElementById(\"w\");\r\nvar e=\"Number of files \"+p1.length;\r\nfor(var i=0; i&lt;p1.length; i++){\r\nvar r=p1[0];\r\ne=e+\"&lt;p&gt;&lt;br&gt;Size Of File: \"+r.size + \"bytes&lt;br&gt;Name Of File: \"+r.name+\"&lt;br&gt;Mime Type Of File \"+r.type+\"&lt;\/p&gt;\";\r\nc.innerHTML=e;\r\n}\r\n}\r\n&lt;\/script&gt;\r\n&lt;p&gt;\r\n&lt;input type =file id=pick onchange=\"change()\" multiple &gt;\r\n&lt;\/p&gt;\r\n&lt;div id=w&gt;\r\n\r\n&lt;\/div&gt;\r\n\t&lt;\/body&gt;\r\n\t&lt;\/html&gt;\r\n<\/pre>\n<p>The above code iterates through the FileList object and prints out the details of each file. In line 29 we get the file chooser object (input type file) and store it in a variable. In 30 we store the FileList object in a variable, in line 31 we store our div object in a variable. In the for loop we iterate through the FileList object and store the details of each file in a variable(as a string) and print the result on the screen.<\/p>\n<h3>1.3 Displaying A Picture From Disk<\/h3>\n<p>In this section we are going to display picture\/s or image\/s stored on the user hard drive in the browser. Once the user has selected a file and you have a reference to the selected file (e.g. via the onchange\u00a0event) you can read the file using a FileReader. The FileReader\u00a0object contains the following functions, you can use to load files with:<\/p>\n<ul>\n<li>readAsText()<\/li>\n<li>readAsDataUrl()<\/li>\n<li>readAsArrayBuffer()<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><em>index4.html<\/em><\/span><\/p>\n<pre class=\"brush:html\">&lt;!DOCTYPE html&gt; \r\n&lt;html lang=en&gt;\r\n\t&lt;head&gt;\r\n\t&lt;style&gt;\r\n\thtml, body{\r\n\twidth:100%;\r\n\theight:100%;\r\n\tmargin:0%;\r\n\tfont-family:\"helvetica\",\"verdana\",\"calibri\", \"san serif\";\r\n\toverflow:visible;\r\n\tpadding:0%;\r\n\tborder:0%;\r\n\t}\r\n#pick{\r\nmargin:10px;\r\n}\r\n\t&lt;\/style&gt;\r\n\t \t\t&lt;meta charset=\"utf-8\" \/&gt;\r\n\t\t&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi\"\/&gt;\r\n\t\r\n\t&lt;title&gt; \r\nHtml5 File API Example\r\n&lt;\/title&gt;\r\n\r\n\t&lt;\/head&gt;\r\n\t&lt;body&gt;\r\n&lt;script&gt;\r\nfunction change(){\r\n\/\/get the file chooser object\r\nvar p=document.getElementById(\"pick\")\r\n\/\/get the div element where the  images will be displayed\r\npd=document.getElementById(\"pr\");\r\nvar p1=p.files;\r\n\/\/get the first file in the list\r\nvar p2=p.files[0];\r\n\/\/create a reader object to read the file\r\nvar reader = new FileReader(); \r\n\/\/ register an onload object on the reader\r\nreader.onload = function(loadedEvent) { \r\ne=document.createElement(\"img\"); \/\/ create an image element\r\ne.setAttribute(\"src\",loadedEvent.target.result); \/\/ set the SRC of the image\r\ne.setAttribute(\"width\",\"80%\"); \/\/ set the width of the image\r\npd.appendChild(e); \/\/ add the image \r\nalert(\"\")\r\n } \r\nreader.readAsDataURL(p2);\/\/ read the file as a dataUrl\r\n\r\n}\r\n&lt;\/script&gt;\r\n&lt;p&gt;\r\n&lt;input type =file id=pick onchange=\"change()\" &gt;\r\n&lt;\/p&gt;\r\n&lt;div id=pr&gt;\r\n\r\n&lt;\/div&gt;\r\n\t&lt;\/body&gt;\r\n\t&lt;\/html&gt;\r\n<\/pre>\n<p>When you select an image, it is displayed in the browser, but you can only select one image at a time.<\/p>\n<h3>1.3 Display Text<\/h3>\n<p>In the next example, we are going to read text from a text file and display it in the browser.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index4.html<\/em><\/span><\/p>\n<pre class=\"brush:html\">&lt;!DOCTYPE html&gt; \r\n&lt;html lang=en&gt;\r\n\t&lt;head&gt;\r\n\t&lt;style&gt;\r\n\thtml, body{\r\n\twidth:100%;\r\n\theight:100%;\r\n\tmargin:0%;\r\n\tfont-family:\"helvetica\",\"verdana\",\"calibri\", \"san serif\";\r\n\toverflow:visible;\r\n\tpadding:0%;\r\n\tborder:0%;\r\n\t}\r\n#pick{\r\nmargin:10px;\r\n}\r\n\t&lt;\/style&gt;\r\n\t \t\t&lt;meta charset=\"utf-8\" \/&gt;\r\n\t\t&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi\"\/&gt;\r\n\t\r\n\t&lt;title&gt; \r\nHtml5 File API Example\r\n&lt;\/title&gt;\r\n\r\n\t&lt;\/head&gt;\r\n\t&lt;body&gt;\r\n&lt;script&gt;\r\nfunction change(){\r\n\/\/get the file chooser\r\nvar p=document.getElementById(\"pick\")\r\n\/\/get the FileList Object\r\nvar p1=p.files;\r\n\r\n\/\/create a reader object to read the file\r\nvar reader = new FileReader(); \r\n\/\/ register an onload object on the reader\r\nreader.onload = function(loadedEvent) { \r\nvar pd=document.body;\r\ne=document.createElement(\"div\"); \/\/ create a div element\r\ne.setAttribute(\"id\",\"d\"); \/\/ set the id for the div\r\ne.setAttribute(\"width\",\"80%\"); \/\/ set the width of the div\r\npd.appendChild(e); \/\/ add the div\r\ne.innerHTML=\"&lt;p&gt;\"+loadedEvent.target.result+\"&lt;\/p&gt;\"\r\n\r\n } \r\nreader.readAsText(p1[0]);\/\/ read the file as a dataUrl\r\n}\r\n&lt;\/script&gt;\r\n&lt;p&gt;\r\n&lt;input type =file id=pick onchange=\"change()\" &gt;\r\n&lt;\/p&gt;\r\n\r\n\t&lt;\/body&gt;\r\n\t&lt;\/html&gt;\r\n<\/pre>\n<h2>2. Summary<\/h2>\n<p>In this example we learnt about HTML5 file API. We also studied about the File, FileReader and FileList objects. We learnt how to read images and text file from the users hard drive and display the contents appropriately in the browser.<\/p>\n<h2>3. Download the source code<\/h2>\n<div class=\"download\">\n<p><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here:\u00a0<strong><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2017\/01\/html5fileapi.zip\">html5fileapi<\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite difficult or outrightly impossible to do on the browser, possible. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [ulp id=&#8217;tgm4cmEWcKUikZNn&#8217;] &nbsp; In this &hellip;<\/p>\n","protected":false},"author":164,"featured_media":914,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[428],"class_list":["post-15838","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html5","tag-file-api"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>HTML5 File API - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML5 File API - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-23T14:15:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-19T11:21:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Olayemi Odunayo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Olayemi Odunayo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/\"},\"author\":{\"name\":\"Olayemi Odunayo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/417918d9b5811210265e8590509718b8\"},\"headline\":\"HTML5 File API\",\"datePublished\":\"2017-01-23T14:15:29+00:00\",\"dateModified\":\"2017-12-19T11:21:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/\"},\"wordCount\":761,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"keywords\":[\"file api\"],\"articleSection\":[\"HTML5\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/\",\"name\":\"HTML5 File API - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"datePublished\":\"2017-01-23T14:15:29+00:00\",\"dateModified\":\"2017-12-19T11:21:25+00:00\",\"description\":\"With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML5\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/html5\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"HTML5 File API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/417918d9b5811210265e8590509718b8\",\"name\":\"Olayemi Odunayo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/016b2a353262962fceecf5c274161cd9ef60fdf1593ec95e71d37f5fd9b444f6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/016b2a353262962fceecf5c274161cd9ef60fdf1593ec95e71d37f5fd9b444f6?s=96&d=mm&r=g\",\"caption\":\"Olayemi Odunayo\"},\"description\":\"I am a programmer and web developer, who has experience in developing websites and writing desktop and mobile applications. I have worked with both schematic and schemaless databases. I am also familiar with third party API and working with cloud servers. I do programming on the client side with Java, JavaScript, html, Ajax and CSS while I use PHP for server side programming.\",\"sameAs\":[\"https:\/\/www.webcodegeeks.com\/\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/olayemi-odunayo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML5 File API - Web Code Geeks - 2026","description":"With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/","og_locale":"en_US","og_type":"article","og_title":"HTML5 File API - Web Code Geeks - 2026","og_description":"With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite","og_url":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2017-01-23T14:15:29+00:00","article_modified_time":"2017-12-19T11:21:25+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","type":"image\/jpeg"}],"author":"Olayemi Odunayo","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Olayemi Odunayo","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/"},"author":{"name":"Olayemi Odunayo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/417918d9b5811210265e8590509718b8"},"headline":"HTML5 File API","datePublished":"2017-01-23T14:15:29+00:00","dateModified":"2017-12-19T11:21:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/"},"wordCount":761,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","keywords":["file api"],"articleSection":["HTML5"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/","url":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/","name":"HTML5 File API - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","datePublished":"2017-01-23T14:15:29+00:00","dateModified":"2017-12-19T11:21:25+00:00","description":"With the advent of HTML5 ( the new standard for the web ) also comes new API, with great features. This new set of API has made things that were quite","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/html5-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/html5\/html5-file-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"HTML5","item":"https:\/\/www.webcodegeeks.com\/category\/html5\/"},{"@type":"ListItem","position":3,"name":"HTML5 File API"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/417918d9b5811210265e8590509718b8","name":"Olayemi Odunayo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/016b2a353262962fceecf5c274161cd9ef60fdf1593ec95e71d37f5fd9b444f6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/016b2a353262962fceecf5c274161cd9ef60fdf1593ec95e71d37f5fd9b444f6?s=96&d=mm&r=g","caption":"Olayemi Odunayo"},"description":"I am a programmer and web developer, who has experience in developing websites and writing desktop and mobile applications. I have worked with both schematic and schemaless databases. I am also familiar with third party API and working with cloud servers. I do programming on the client side with Java, JavaScript, html, Ajax and CSS while I use PHP for server side programming.","sameAs":["https:\/\/www.webcodegeeks.com\/"],"url":"https:\/\/www.webcodegeeks.com\/author\/olayemi-odunayo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/15838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/164"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=15838"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/15838\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/914"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=15838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=15838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=15838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}