Migrate from koa-route to koa-router
This commit is contained in:
parent
8474cca94c
commit
a4bf3dd51d
17 changed files with 206 additions and 291 deletions
|
@ -34,7 +34,7 @@ export class FileController {
|
|||
$rootScope.pageTitle = ' - ' + file.name;
|
||||
if (file.status === 'uploading') {
|
||||
file.percent = 0;
|
||||
var ws = new ReconnectingWebSocket('wss://' + window.location.hostname + window.settings.api + '/file/' + file.id);
|
||||
var ws = new ReconnectingWebSocket(window.settings.apiURL.replace(/^http/, 'ws') + '/file/' + file.id);
|
||||
ws.onmessage = function (msg) {
|
||||
var evt = JSON.parse(msg.data);
|
||||
$rootScope.$broadcast(evt.type, evt.data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue