Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. uvonceumern_6611
    3. Posts
    U
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by uvonceumern_6611

    • ProGet Asset: downloaded installer is no longer executable

      I am uploading an installer (.exe) to an asset directory (via the API using Postman at the moment).

      Uploading the file works fine, I get a 201.

      However, when I download the file, it is no longer a valid win32 executable. Here is the diff of the uploaded and the downloaded file:

      ac5ef7fc-b465-4c4f-ae12-71ac4aacd5b8-image.png

      It looks like the file header is broken and a few extra bytes were added.

      What am I doing wrong?

      Here is the generated C# code from Postman:

      var client = new HttpClient();
      var request = new HttpRequestMessage(HttpMethod.Post, "https://my-server/endpoints/modular-installers/content/Workstation_setup_latest.exe");
      request.Headers.Add("X-ApiKey", "my-api-key");
      request.Content = new StreamContent(File.OpenRead("/C:/Temp/Workstation_setup_v0.0.546.exe"));
      var response = await client.SendAsync(request);
      response.EnsureSuccessStatusCode();
      Console.WriteLine(await response.Content.ReadAsStringAsync());
      

      And here is a screenshot from file in ProGet:

      a8106151-3782-419e-aaec-626d0e28c8c2-image.png

      Update: If I upload the file via the Web UI, this issue does not happen. It seems to be tied to how I upload the file via API.

      Update 2: It seems like Chrome is adding bytes during / after download. The file size in ProGet is correct, but after the download the file size increases by 262 bytes. I tried it in Edge and this does not happen.

      When I download the file from the original source (GitHub), this behavior does not occur.

      Update 3: Chrome seems to add some form of header to the downloaded file: d458a526-e9cb-476c-be43-a44202bec5b2-image.png

      posted in Support
      U
      uvonceumern_6611
    • 1 / 1