forked from FarmMaps/FarmMapsApiClient
Initial resumable file upload.
Other changes.
This commit is contained in:
45
FarmmapsApi/Models/FileRequest.cs
Normal file
45
FarmmapsApi/Models/FileRequest.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace FarmmapsApi.Models
|
||||
{
|
||||
public class FileRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Code of the parent
|
||||
/// </summary>
|
||||
/// <example>41971e7ea8a446069a817e66b608dcae</example>
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Geometry meta data
|
||||
/// </summary>
|
||||
/// <example>{"type": "Point","coordinates": [5.27, 52.10]}</example>
|
||||
public JObject Geometry { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the file to upload
|
||||
/// </summary>
|
||||
/// <example>MyFile.tiff</example>
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Size of the file to upload
|
||||
/// </summary>
|
||||
/// <example>67351</example>
|
||||
[Required]
|
||||
public long Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If a chunked upload, the size of a single chunk
|
||||
/// </summary>
|
||||
/// <example>1048576</example>
|
||||
public long ChunkSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional data for the item coupled with the file
|
||||
/// </summary>
|
||||
public JObject Data { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user