Upload zipped minidumps


We are evaluating which crash report service to choose for our company. We have tried to upload a zipped minidump file to the Sentry server but we keep getting ‘400: Bad Request, invalid minidump’ response. If we upload it non-zipped the minidump is uploaded successfully (if the file is smaller than 20 MB). However, our uncompressed minidumps are normally ~25 MB in size which is above the 20 MB limit. Our compressed minidumps are ~200 KB which would fit the limit.

The documentation suggests that uploading compressed minidumps is possible. Can you someone suggest me how?

Thanks in advance,

I use the following C# code to upload (but I tried using curl.exe too and it doesn’t matter) in a multipart HTTP request:

internal static async Task<bool> SendToSentry(string minidumpPath)
    // https://docs.sentry.io/platforms/native/minidump/?_ga=2.16220222.940019340.1590053210-338143538.1590053210
    var client = new HttpClient();
    var uriBuilder = new UriBuilder("https://", "o396075.ingest.sentry.io") { Path = "api/5248944/minidump" };
    var parameters = HttpUtility.ParseQueryString(string.Empty);
    parameters.Add("sentry_key", "<SECRET_KEY>");
    uriBuilder.Query = parameters.ToString();

    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("multipart/form-data"));
    using (var formContent = new MultipartFormDataContent("765ehgeyt54egr54"))
        formContent.Headers.ContentType.MediaType = "multipart/form-data";
        var dumpContent = new StreamContent(File.OpenRead(minidumpPath));
        dumpContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/zip");
        formContent.Add(dumpContent, "upload_file_minidump", Path.GetFileName(minidumpPath));

        return await await client.PostAsync(uriBuilder.Uri, formContent);