firefox-android-nightly is also busted

This commit is contained in:
ed 2019-06-29 20:19:32 +00:00
parent b2e7bca2b1
commit bebc49595d
4 changed files with 20 additions and 10 deletions

View file

@ -70,11 +70,14 @@ in the `scripts` folder:
* upload to pypi with `make-pypi-release.(sh|bat)`
# immediate todo
# todo
roughly sorted by priority
* look into android thumbnail cache file format
* support pillow-simd
* cache sha512 chunks on client
* symlink existing files on upload
* enforce chunksize and sha512('\n'.join(chunks))
* figure out the deal with pixel3a not being connectable as hotspot
* pixel3a having unpredictable 3sec latency in general :||||

View file

@ -64,8 +64,8 @@ function o(id) {
crypto.subtle.digest(
'SHA-512', new Uint8Array(1)
).then(
function(x) {up2k_init(true)},
function(x) {up2k_init(false)}
function (x) { up2k_init(true) },
function (x) { up2k_init(false) }
);
}
catch (ex) {
@ -75,6 +75,8 @@ function o(id) {
function up2k_init(have_crypto) {
//have_crypto = false;
// show modal message
function showmodal(msg) {
o('u2notbtn').innerHTML = msg;
@ -234,12 +236,14 @@ function up2k_init(have_crypto) {
fobj = fobj.getAsFile();
}
try {
fobj.size;
if (fobj.size < 1)
throw 1;
}
catch (ex) {
return alert(
'Due to a browser bug, Firefox-Android can only do one file at a time:\n' +
'https://bugzilla.mozilla.org/show_bug.cgi?id=1456557');
'Due to a browser bug, Firefox-Android can only select one file at a time. ' +
'This works in "Firefox Preview" (new Firefox, currently in beta).\n\n' +
'Google firefox bug 1456557 for more info');
}
var entry = {
"n": parseInt(st.files.length.toString()),
@ -425,7 +429,7 @@ function up2k_init(have_crypto) {
};
var hash_done = function (hashbuf) {
t.hash.push(buf2b64(hashbuf).substr(0, 44));
t.hash.push(buf2b64(hashbuf).substr(0, 43));
prog(t.n, nchunk, col_hashed);
if (++nchunk < nchunks) {
@ -456,7 +460,8 @@ function up2k_init(have_crypto) {
// TODO remove
var ts = new Date().getTime();
alert((ts - t.t0) + '\n' + t.hash.join('\n'));
var spd = (t.size / ((ts - t.t0) / 1000.)) / (1024 * 1024.);
alert('{0} ms, {1} MB/s\n'.format(ts - t.t0, spd.toFixed(3)) + t.hash.join('\n'));
var xhr = new XMLHttpRequest();
xhr.onload = function (ev) {

View file

@ -66,6 +66,9 @@
background: #333;
padding-top: 1em;
}
#u2notbtn * {
line-height: 1.3em;
}
#u2tab {
margin: 3em auto;
width: calc(100% - 2em);

View file

@ -17,8 +17,7 @@ RUN apk add make g++ git bash npm patch wget tar pigz gzip unzip \
RUN cd asmcrypto.js-$ver_asmcrypto \
&& echo "export { Sha512 } from './hash/sha512/sha512';" > src/entry-export_all.ts \
&& node -r esm build.js \
&& mv asmcrypto.all.es5.js /z/dist/sha512.js \
&& mv dist_es5/hash/sha512/sha512.asm.js /z/dist/
&& mv asmcrypto.all.es5.js /z/dist/sha512.js
# build ogvjs
RUN cd ogvjs-$ver_ogvjs \