mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
firefox-android-nightly is also busted
This commit is contained in:
parent
b2e7bca2b1
commit
bebc49595d
|
@ -70,11 +70,14 @@ in the `scripts` folder:
|
||||||
* upload to pypi with `make-pypi-release.(sh|bat)`
|
* upload to pypi with `make-pypi-release.(sh|bat)`
|
||||||
|
|
||||||
|
|
||||||
# immediate todo
|
# todo
|
||||||
|
|
||||||
roughly sorted by priority
|
roughly sorted by priority
|
||||||
|
|
||||||
* look into android thumbnail cache file format
|
* look into android thumbnail cache file format
|
||||||
* support pillow-simd
|
* 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
|
* figure out the deal with pixel3a not being connectable as hotspot
|
||||||
* pixel3a having unpredictable 3sec latency in general :||||
|
* pixel3a having unpredictable 3sec latency in general :||||
|
||||||
|
|
|
@ -64,8 +64,8 @@ function o(id) {
|
||||||
crypto.subtle.digest(
|
crypto.subtle.digest(
|
||||||
'SHA-512', new Uint8Array(1)
|
'SHA-512', new Uint8Array(1)
|
||||||
).then(
|
).then(
|
||||||
function(x) {up2k_init(true)},
|
function (x) { up2k_init(true) },
|
||||||
function(x) {up2k_init(false)}
|
function (x) { up2k_init(false) }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
|
@ -75,6 +75,8 @@ function o(id) {
|
||||||
|
|
||||||
|
|
||||||
function up2k_init(have_crypto) {
|
function up2k_init(have_crypto) {
|
||||||
|
//have_crypto = false;
|
||||||
|
|
||||||
// show modal message
|
// show modal message
|
||||||
function showmodal(msg) {
|
function showmodal(msg) {
|
||||||
o('u2notbtn').innerHTML = msg;
|
o('u2notbtn').innerHTML = msg;
|
||||||
|
@ -234,12 +236,14 @@ function up2k_init(have_crypto) {
|
||||||
fobj = fobj.getAsFile();
|
fobj = fobj.getAsFile();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
fobj.size;
|
if (fobj.size < 1)
|
||||||
|
throw 1;
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
return alert(
|
return alert(
|
||||||
'Due to a browser bug, Firefox-Android can only do one file at a time:\n' +
|
'Due to a browser bug, Firefox-Android can only select one file at a time. ' +
|
||||||
'https://bugzilla.mozilla.org/show_bug.cgi?id=1456557');
|
'This works in "Firefox Preview" (new Firefox, currently in beta).\n\n' +
|
||||||
|
'Google firefox bug 1456557 for more info');
|
||||||
}
|
}
|
||||||
var entry = {
|
var entry = {
|
||||||
"n": parseInt(st.files.length.toString()),
|
"n": parseInt(st.files.length.toString()),
|
||||||
|
@ -425,7 +429,7 @@ function up2k_init(have_crypto) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var hash_done = function (hashbuf) {
|
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);
|
prog(t.n, nchunk, col_hashed);
|
||||||
if (++nchunk < nchunks) {
|
if (++nchunk < nchunks) {
|
||||||
|
@ -456,7 +460,8 @@ function up2k_init(have_crypto) {
|
||||||
|
|
||||||
// TODO remove
|
// TODO remove
|
||||||
var ts = new Date().getTime();
|
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();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.onload = function (ev) {
|
xhr.onload = function (ev) {
|
||||||
|
|
|
@ -66,6 +66,9 @@
|
||||||
background: #333;
|
background: #333;
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
}
|
}
|
||||||
|
#u2notbtn * {
|
||||||
|
line-height: 1.3em;
|
||||||
|
}
|
||||||
#u2tab {
|
#u2tab {
|
||||||
margin: 3em auto;
|
margin: 3em auto;
|
||||||
width: calc(100% - 2em);
|
width: calc(100% - 2em);
|
||||||
|
|
|
@ -17,8 +17,7 @@ RUN apk add make g++ git bash npm patch wget tar pigz gzip unzip \
|
||||||
RUN cd asmcrypto.js-$ver_asmcrypto \
|
RUN cd asmcrypto.js-$ver_asmcrypto \
|
||||||
&& echo "export { Sha512 } from './hash/sha512/sha512';" > src/entry-export_all.ts \
|
&& echo "export { Sha512 } from './hash/sha512/sha512';" > src/entry-export_all.ts \
|
||||||
&& node -r esm build.js \
|
&& node -r esm build.js \
|
||||||
&& mv asmcrypto.all.es5.js /z/dist/sha512.js \
|
&& mv asmcrypto.all.es5.js /z/dist/sha512.js
|
||||||
&& mv dist_es5/hash/sha512/sha512.asm.js /z/dist/
|
|
||||||
|
|
||||||
# build ogvjs
|
# build ogvjs
|
||||||
RUN cd ogvjs-$ver_ogvjs \
|
RUN cd ogvjs-$ver_ogvjs \
|
||||||
|
|
Loading…
Reference in a new issue