pull/5829/head
2dust 2 months ago
parent 409fe5290e
commit 53a2fbd0ff

@ -98,19 +98,26 @@ namespace ServiceLib.Handler
} }
await TryCreateDir(); await TryCreateDir();
var testName = "readme_test"; try
var myContent = new StringContent(testName);
var result = await _client.PutFile($"{_webDir}/{testName}", myContent);
if (result.IsSuccessful)
{ {
await _client.Delete($"{_webDir}/{testName}"); var testName = "readme_test";
return true; var myContent = new StringContent(testName);
var result = await _client.PutFile($"{_webDir}/{testName}", myContent);
if (result.IsSuccessful)
{
await _client.Delete($"{_webDir}/{testName}");
return true;
}
else
{
SaveLog(result.Description);
}
} }
else catch (Exception ex)
{ {
SaveLog(result.Description); SaveLog(ex);
return false;
} }
return false;
} }
public async Task<bool> PutFile(string fileName) public async Task<bool> PutFile(string fileName)

Loading…
Cancel
Save