can now specify geojson bounds for upload.

changed how to get agents for haulmkilling.
This commit is contained in:
2021-04-11 17:22:19 +02:00
parent a94fb260c8
commit beaf00a043
5 changed files with 24 additions and 39 deletions

View File

@@ -284,6 +284,7 @@ namespace FarmmapsApi.Services
/// <returns></returns>
/// <exception cref="FileNotFoundException"></exception>
public async Task<UploadResults> UploadFile(string filePath, string parentItemCode,
string geoJsonString = null,
Action<IUploadProgress> progressCallback = null)
{
if (!File.Exists(filePath))
@@ -300,7 +301,8 @@ namespace FarmmapsApi.Services
{
Name = Path.GetFileName(filePath),
ParentCode = parentItemCode,
Size = uploadStream.Length
Size = uploadStream.Length,
Geometry = string.IsNullOrEmpty(geoJsonString) ? null : JObject.Parse(geoJsonString)
};
using var httpClient = CreateConfigurableHttpClient(_httpClient);