Skip to content

[artifact] CreateArtifact returns 400 "mime_type a valid mime_type is required" for some file types when uploading without archive #2324

@Lilly-jlpeters

Description

@Lilly-jlpeters

Describe the bug
Uploading certain single files with artifact v7 and archive: false fails at CreateArtifact with a 400 validation error for mime_type.

This appears related to MIME type values sent by the artifact client for specific extensions.

Related upstream report in actions/upload-artifact: actions/upload-artifact#765

Error:
Failed to CreateArtifact: Received non-retryable error: Failed request: (400) Bad Request: mime_type a valid mime_type is required for this artifact version

To Reproduce

  1. Create a workflow that uses actions/upload-artifact@v4 with archive: false.
  2. Upload a single .xlsx file (or .7z in some reports).
  3. Run on ubuntu-latest (Linux hosted runner).
  4. Observe CreateArtifact fails with HTTP 400 and mime_type a valid mime_type is required for this artifact version.

Expected behavior
Upload should succeed for these file types, or the client should fall back to a backend-accepted MIME type when a mapped type is rejected.

Screenshots
See run/error details linked in actions/upload-artifact#765

Desktop (please complete the following information):

  • OS: Linux (ubuntu-latest runner)
  • Browser: N/A
  • Version: N/A

Additional context

  • actions/upload-artifact issue [CACHE] 503 on chunk upload #765 reports reproducible failure for .xlsx with archive: false.
  • Additional user reports mention .7z failing, while some other types (e.g. .apk, .tar.xz) can succeed, suggesting MIME-specific backend validation differences.
  • This may involve MIME mapping in @actions/artifact used during CreateArtifact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions