mirror of
https://github.com/9001/copyparty.git
synced 2026-02-26 13:33:09 -07:00
textfile-viewer: xhr large docs; closes #1279
This commit is contained in:
parent
fc8a4b8ea2
commit
f02e9cf6d3
|
|
@ -7384,6 +7384,7 @@ class HttpCli(object):
|
|||
else:
|
||||
self.log("doc 2big: %r" % (doc,), 6)
|
||||
doctxt = "( size of textfile exceeds serverside limit )"
|
||||
# NOTE: browser.js expects this exact message
|
||||
else:
|
||||
self.log("doc 404: %r" % (doc,), 6)
|
||||
doctxt = "( textfile not found )"
|
||||
|
|
|
|||
|
|
@ -5037,7 +5037,7 @@ var showfile = (function () {
|
|||
}
|
||||
r.mktree();
|
||||
if (em) {
|
||||
if (r.taildoc)
|
||||
if (r.taildoc || em[2] == '( size of textfile exceeds serverside limit )')
|
||||
r.show(em[0], true);
|
||||
else
|
||||
render(em);
|
||||
|
|
@ -9651,7 +9651,7 @@ var rcm = (function () {
|
|||
break;
|
||||
case 'ply': selFile.type == 'gf' ? thegrid.imshow(selFile.name) : play('f-' + selFile.id); break;
|
||||
case 'pla': play('f-' + selFile.id); break;
|
||||
case 'txt': location = selFile.dpath + '?doc=' + selFile.name; break;
|
||||
case 'txt': showfile.show(selFile.name); break;
|
||||
case 'md': location = selFile.path + (has(selFile.path, '?') ? '&v' : '?v'); break;
|
||||
case 'cpl': cliptxt(selFile.url, function() {toast.ok(2, L.clipped)}); break;
|
||||
case 'dl': ebi('seldl').click(); break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue