Fixed minor download/upload variable mistake

This commit is contained in:
WolverinDEV 2020-06-10 23:02:03 +02:00
parent 5af68c0a1c
commit 9b77978f8e
2 changed files with 6 additions and 6 deletions

View file

@ -518,7 +518,7 @@ export class FileManager {
} }
initializeFileDownload(options: InitializeDownloadOptions) : FileDownloadTransfer { initializeFileDownload(options: InitializeDownloadOptions) : FileDownloadTransfer {
const transfer = new FileDownloadTransfer(FileTransferDirection.DOWNLOAD, ++this.clientTransferIdIndex, { const transfer = new FileDownloadTransfer(++this.clientTransferIdIndex, {
channel_id: options.channel | 0, channel_id: options.channel | 0,
name: options.name, name: options.name,
path: options.path path: options.path
@ -556,7 +556,7 @@ export class FileManager {
} }
initializeFileUpload(options: InitializeUploadOptions) : FileUploadTransfer { initializeFileUpload(options: InitializeUploadOptions) : FileUploadTransfer {
const transfer = new FileUploadTransfer(FileTransferDirection.DOWNLOAD, ++this.clientTransferIdIndex, { const transfer = new FileUploadTransfer( ++this.clientTransferIdIndex, {
channel_id: options.channel | 0, channel_id: options.channel | 0,
name: options.name, name: options.name,
path: options.path path: options.path

View file

@ -391,8 +391,8 @@ export class FileDownloadTransfer extends FileTransfer {
public readonly targetSupplier: TransferTargetSupplier; public readonly targetSupplier: TransferTargetSupplier;
public target: TransferTarget; public target: TransferTarget;
constructor(direction, clientTransferId, properties: TransferProperties, targetSupplier) { constructor(clientTransferId, properties: TransferProperties, targetSupplier) {
super(direction, clientTransferId, properties); super(FileTransferDirection.DOWNLOAD, clientTransferId, properties);
this.targetSupplier = targetSupplier; this.targetSupplier = targetSupplier;
} }
} }
@ -402,8 +402,8 @@ export class FileUploadTransfer extends FileTransfer {
public source: TransferSource; public source: TransferSource;
public fileSize: number; public fileSize: number;
constructor(direction, clientTransferId, properties: TransferProperties, sourceSupplier) { constructor(clientTransferId, properties: TransferProperties, sourceSupplier) {
super(direction, clientTransferId, properties); super(FileTransferDirection.UPLOAD, clientTransferId, properties);
this.sourceSupplier = sourceSupplier; this.sourceSupplier = sourceSupplier;
} }
} }