THIS IS AN EXAMPLE OF HOW A CLIENT MIGHT IMPLEMENT THE CHUNKED UPLOAD A Bearer Token will need to be included public async Task UploadLargeFileAsync(string filePath, string serverUrl) { const int chunkSize = 1024 * 1024; // 1MB chunk size using var fileStream = System.IO.File.OpenRead(filePath); byte[] buffer = new byte[chunkSize]; int bytesRead; int chunkIndex = 0; long totalFileSize = fileStream.Length; int totalChunks = (int)Math.Ceiling((double)totalFileSize / chunkSize); while ((bytesRead = await fileStream.ReadAsync(buffer, 0, buffer.Length)) > 0) { using var client = new HttpClient(); using var form = new MultipartFormDataContent(); // Prepare current chunk var chunkContent = new ByteArrayContent(buffer, 0, bytesRead); form.Add(chunkContent, "fileChunk", Path.GetFileName(filePath)); form.Add(new StringContent(chunkIndex.ToString()), "chunkIndex"); form.Add(new StringContent(totalChunks.ToString()), "totalChunks"); // Send to server var response = await client.PostAsync(serverUrl, form); if (!response.IsSuccessStatusCode) return false; chunkIndex++; } return true; }