mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 13:09:59 -06:00
FF-1721: New plugin Nextcloud
This commit is contained in:
@@ -58,7 +58,8 @@ public class UploadToNextcloud : Node
|
||||
}
|
||||
|
||||
var file = args.ReplaceVariables(File ?? string.Empty, stripMissing: true)?.EmptyAsNull() ?? args.WorkingFile;
|
||||
var destination = args.ReplaceVariables(DestinationPath ?? string.Empty, stripMissing: true);
|
||||
var destination = args.ReplaceVariables(DestinationPath ?? string.Empty, stripMissing: true) ?? string.Empty;
|
||||
destination = destination.TrimStart('/');
|
||||
|
||||
if (string.IsNullOrWhiteSpace(destination))
|
||||
{
|
||||
@@ -75,6 +76,9 @@ public class UploadToNextcloud : Node
|
||||
return -1;
|
||||
}
|
||||
|
||||
args.Logger?.ILog("File: " + local.Value);
|
||||
args.Logger?.ILog("Destination: " + destination);
|
||||
|
||||
var uploader = new NextcloudUploader(args.Logger!, settings.Url, settings.Username, settings.Password);
|
||||
var result = uploader.UploadFile(local.Value, destination);
|
||||
if(result.Failed(out error))
|
||||
|
||||
Reference in New Issue
Block a user