Increase ws timeout + lower sliceLength + console informations
This commit is contained in:
parent
d1d3132270
commit
4858866569
|
@ -13,7 +13,7 @@ use Filesys::DfPortable;
|
||||||
sub upload {
|
sub upload {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
|
|
||||||
$c->inactivity_timeout(300000);
|
$c->inactivity_timeout(30000000);
|
||||||
$c->debug('Client connected');
|
$c->debug('Client connected');
|
||||||
$c->on(
|
$c->on(
|
||||||
message => sub {
|
message => sub {
|
||||||
|
|
|
@ -182,6 +182,8 @@ function sliceAndUpload(randomkey, i, parts, j, delay, del_at_first_view, short)
|
||||||
};
|
};
|
||||||
data = JSON.stringify(data);
|
data = JSON.stringify(data);
|
||||||
|
|
||||||
|
console.log('sending slice '+(j + 1)+'/'+parts+' of file '+file.name);¬
|
||||||
|
|
||||||
// Verify that we have a websocket and send json
|
// Verify that we have a websocket and send json
|
||||||
if (window.ws.readyState === 3) {
|
if (window.ws.readyState === 3) {
|
||||||
window.ws = spawnWebsocket(function() {
|
window.ws = spawnWebsocket(function() {
|
||||||
|
@ -206,6 +208,8 @@ function updateProgressBar(data) {
|
||||||
var short = data.short;
|
var short = data.short;
|
||||||
var created_at = data.created_at;
|
var created_at = data.created_at;
|
||||||
|
|
||||||
|
console.log('getting response for slice '+(j + 1)+'/'+parts+' of file '+data.name);
|
||||||
|
|
||||||
var dp = document.getElementById('progress-'+window.fc);
|
var dp = document.getElementById('progress-'+window.fc);
|
||||||
var key = dp.getAttribute('data-key');
|
var key = dp.getAttribute('data-key');
|
||||||
|
|
||||||
|
@ -354,5 +358,5 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
window.ws = spawnWebsocket();
|
window.ws = spawnWebsocket();
|
||||||
|
|
||||||
// Use slice of 10MB
|
// Use slice of 10MB
|
||||||
window.sliceLength = 10000000;
|
window.sliceLength = 2000000;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue