forked from FarmMaps/FarmMapsApiClient
Seperated eventhub service from api service.
wip nbs flow. Changed uploading a bit.
This commit is contained in:
@@ -55,7 +55,7 @@ namespace FarmmapsApi.Services
|
||||
/// completed.
|
||||
/// Caller is responsible for closing the <paramref name="contentStream"/>.
|
||||
/// </remarks>
|
||||
public FarmmapsUploader(ConfigurableHttpClient httpClient, Stream contentStream, FileRequest body, string contentType)
|
||||
public FarmmapsUploader(ConfigurableHttpClient httpClient, Stream contentStream, FileRequest body, string contentType, string path)
|
||||
: base(contentStream,
|
||||
new ResumableUploadOptions
|
||||
{
|
||||
@@ -69,9 +69,12 @@ namespace FarmmapsApi.Services
|
||||
|
||||
_streamLength = ContentStream.CanSeek ? ContentStream.Length : UnknownSize;
|
||||
|
||||
var twoMB = 2 * 0x100000;
|
||||
ChunkSize = twoMB;
|
||||
body.ChunkSize = ChunkSize;
|
||||
Body = body;
|
||||
Path = "api/v1/file";
|
||||
|
||||
Path = path;
|
||||
HttpClient = httpClient;
|
||||
HttpMethod = HttpConsts.Post;
|
||||
ContentType = contentType;
|
||||
|
Reference in New Issue
Block a user