forked from FarmMaps/FarmMapsApiClient
Implemented, tested geojson as 'input'
This commit is contained in:
@@ -9,13 +9,13 @@ using FarmmapsApi.Services;
|
||||
using FarmmapsNbs.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using static FarmmapsApiSamples.Constants;
|
||||
|
||||
namespace FarmmapsNbs
|
||||
{
|
||||
public class NbsApplication : IApplication
|
||||
{
|
||||
private const string DownloadFolder = "Downloads";
|
||||
private const string GEOJSON_ITEMTYPE = "vnd.farmmaps.itemtype.geojson";
|
||||
|
||||
private readonly ILogger<NbsApplication> _logger;
|
||||
private readonly FarmmapsApiService _farmmapsApiService;
|
||||
@@ -81,7 +81,7 @@ namespace FarmmapsNbs
|
||||
var isGeoJson = input.File.Contains("json");
|
||||
var dataPath = Path.Combine("Data", input.File);
|
||||
var shapeItem = isGeoJson ?
|
||||
await _generalService.UploadDataAsync(uploadedRoot, GEOJSON_ITEMTYPE, dataPath, Path.GetFileNameWithoutExtension(input.File)):
|
||||
await _generalService.UploadDataAsync(uploadedRoot, SHAPE_PROCESSED_ITEMTYPE, dataPath, Path.GetFileNameWithoutExtension(input.File)):
|
||||
await _generalService.UploadZipWithShapeAsync(uploadedRoot, dataPath, Path.GetFileNameWithoutExtension(input.File));
|
||||
|
||||
if (shapeItem == null)
|
||||
|
Reference in New Issue
Block a user