added field polygon to data upload

This commit is contained in:
2021-04-02 16:15:44 +02:00
parent b758913693
commit 760f3fad64
5 changed files with 16 additions and 11 deletions

View File

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