19 lines
382 B
JavaScript
19 lines
382 B
JavaScript
// @ts-check
|
|
|
|
import * as base64 from "../common/vendor/base64-js.js";
|
|
|
|
const main = () => {
|
|
// TODO: We may want a better UI here.
|
|
// TODO: Handle errors.
|
|
const fileDataBase64 = window.sessionStorage.getItem("fileData");
|
|
if (!fileDataBase64) {
|
|
location.href = "..";
|
|
return;
|
|
}
|
|
const bytes = base64.toByteArray(fileDataBase64);
|
|
|
|
console.log(bytes);
|
|
};
|
|
|
|
main();
|