What am i doing wrong? I have the autorization, I have the bucket, I have the file but i can't upload it, and it's too large to use UploadObject.
here's the part of the upload of my code
using (StreamReader streamReader = new StreamReader(filePath))
{ Byte[] buffer = new Byte[2097153];
var QtdeBytesFaltantes = streamReader.BaseStream.Length;
var byteInicio = 0;
var byteFim = 0;
while (QtdeBytesFaltantes > 0)
{
byteFim = await streamReader.BaseStream.ReadAsync(buffer, 0, buffer.Length);
await objectsApi.UploadChunkAsync(bucketKey,
Path.GetFileName(filePath),
(int)streamReader.BaseStream.Length,
"bytes " + byteInicio + "-" + byteFim + "/" + (int)streamReader.BaseStream.Length,
"IdUnicoDaSessao",
streamReader.BaseStream);
QtdeBytesFaltantes -= buffer.Length;
byteInicio = byteFim + 1;
}
dynamic response = await objectsApi.GetObjectAsync(bucketKey, Path.GetFileName(filePath));
return response;