formats.exposed/public/gif/gif.js

19 lines
382 B
JavaScript
Raw Normal View History

2023-08-11 20:06:09 +00:00
// @ts-check
import * as base64 from "../common/vendor/base64-js.js";
2023-08-11 20:06:09 +00:00
const main = () => {
// TODO: We may want a better UI here.
// TODO: Handle errors.
const fileDataBase64 = window.sessionStorage.getItem("fileData");
if (!fileDataBase64) {
2023-08-11 20:06:09 +00:00
location.href = "..";
return;
}
const bytes = base64.toByteArray(fileDataBase64);
2023-08-11 20:06:09 +00:00
console.log(bytes);
};
main();