<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <identifier>filetobase64javascripttiny</identifier>
  <mediatype>texts</mediatype>
  <collection>fringe</collection>
  <collection>loggedin</collection>
  <collection>no-preview</collection>
  <description>This file was stored at "C:\Users\user\Documents\file-to-base64.html"&lt;br /&gt;&lt;br /&gt;Your web browsers needs to have JavaScript enabled in order for this to work. Complete source code of HTML file "file-to-base64.html":&lt;br /&gt;&lt;pre&gt;&lt;span&gt;&lt;&lt;/span&gt;!DOCTYPE html&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;html lang="en"&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;head&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;meta charset="utf-8" /&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;title&lt;span&gt;&gt;&lt;/span&gt;File to Base64 with JavaScript in 400 characters&lt;span&gt;&lt;&lt;/span&gt;/title&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;/head&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;input type="file" /&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;p id="out"&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt;&lt;&lt;/span&gt;/p&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;script&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;var input = document.querySelector('input[type=file]');&lt;br /&gt;input.onchange = function ()&lt;br /&gt;{&lt;br /&gt;  var file = input.files[0],&lt;br /&gt;  reader = new FileReader();&lt;br /&gt;    reader.onloadend = function ()&lt;br /&gt;    {&lt;br /&gt;      var b64 = reader.result&lt;br /&gt;      .replace(/^data:.+;base64,/, ''); /*comment out this line for Base64 as a data URI*/&lt;br /&gt;      document.getElementById("out").innerHTML = b64;&lt;br /&gt;    };&lt;br /&gt;  reader.readAsDataURL(file);&lt;br /&gt;};&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;/script&lt;span&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;&lt;/span&gt;/html&lt;span&gt;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Sources:&lt;br /&gt;* Add where I got the code from, which I later modified [done - no]&lt;br /&gt;* 400 characters inside the script tag, according to https://thewordcounter.com/character-counter/&lt;br /&gt;* Valid HTML according to https://validator.w3.org/nu/#file&lt;br /&gt;</description>
  <language>eng</language>
  <scanner>Internet Archive HTML5 Uploader 1.6.4</scanner>
  <subject>file to Base64; Base64; file encoding; file to Base64 converter; JavaScript; JavaScript tool</subject>
  <title>File to Base64 with JavaScript in 400 characters</title>
  <uploader>leedusmcclein@gmail.com</uploader>
  <publicdate>2020-07-12 03:36:06</publicdate>
  <addeddate>2020-07-12 03:36:06</addeddate>
  <curation>[curator]validator@archive.org[/curator][date]20200712033747[/date][comment]checked for malware[/comment]</curation>
  <identifier-access>http://archive.org/details/filetobase64javascripttiny</identifier-access>
  <identifier-ark>ark:/13960/t45r3vs76</identifier-ark>
  <collection>deemphasize</collection>
  <access-restricted-item>true</access-restricted-item>
</metadata>
