Skip to content

Commit

Permalink
Rename TransferFiles to UploadFiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Mar 11, 2020
1 parent 2991284 commit 412c62d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Agent/Services/DeviceSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ private void RegisterMessageHandlers()
await CommandExecutor.ExecuteCommandFromApi(mode, requestID, command, commandID, senderUserName, HubConnection);
}));
HubConnection.On("TransferFiles", async (string transferID, List<string> fileIDs, string requesterID) =>
HubConnection.On("UploadFiles", async (string transferID, List<string> fileIDs, string requesterID) =>
{
Logger.Write($"File transfer started by {requesterID}.");
Logger.Write($"File upload started by {requesterID}.");
var sharedFilePath = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(),"RemotelySharedFiles")).FullName;
foreach (var fileID in fileIDs)
Expand Down
4 changes: 2 additions & 2 deletions Server/Services/BrowserSocketHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public Task RemoveDevices(string[] deviceIDs)
}


public Task TransferFiles(List<string> fileIDs, string transferID, string[] deviceIDs)
public Task UploadFiles(List<string> fileIDs, string transferID, string[] deviceIDs)
{
DataService.WriteEvent(new EventLog()
{
Expand All @@ -169,7 +169,7 @@ public Task TransferFiles(List<string> fileIDs, string transferID, string[] devi
var connections = GetActiveClientConnections(deviceIDs);
foreach (var connection in connections)
{
DeviceHub.Clients.Client(connection.Key).SendAsync("TransferFiles", transferID, fileIDs, Context.ConnectionId);
DeviceHub.Clients.Client(connection.Key).SendAsync("UploadFiles", transferID, fileIDs, Context.ConnectionId);
}
return Task.CompletedTask;
}
Expand Down
4 changes: 2 additions & 2 deletions Server/wwwroot/scripts/Commands/WebCommands.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Server/wwwroot/scripts/Commands/WebCommands.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Server/wwwroot/scripts/Commands/WebCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ var commands: Array<ConsoleCommand> = [
}
),
new ConsoleCommand(
"TransferFiles",
"UploadFiles",
[
],
"Transfer file(s) to the selected devices.",
"transferfiles",
"Upload file(s) to the selected devices. The files get saved in C:\\Windows\\Temp on the remote computer.",
"uploadfiles",
"",
(parameters, parameterDict) => {
var selectedDevices = Main.DataGrid.GetSelectedDevices();
Expand All @@ -499,7 +499,7 @@ var commands: Array<ConsoleCommand> = [
document.body.appendChild(fileInput);
fileInput.onchange = () => {
uploadFiles(fileInput.files).then(value => {
BrowserSockets.Connection.invoke("TransferFiles", value, transferID, selectedDevices.map(x => x.ID));
BrowserSockets.Connection.invoke("UploadFiles", value, transferID, selectedDevices.map(x => x.ID));
fileInput.remove();
});
}
Expand Down

0 comments on commit 412c62d

Please sign in to comment.