Back

Blog details

How Automatic MIME Type Detection Works on AIOZ Storage

AIOZ Network
5 min readSeptember 07, 2026
aioz-storage
Close-up of code displayed on a computer screen

Automatic MIME type detection on AIOZ Storage solves a specific, easy-to-miss upload problem: what happens to an object's content type when nobody actually sets one. AIOZ announced the feature on May 19, 2026, and the mechanism is straightforward, a priority-based fallback that uses whatever Content-Type a client sends, and reaches for Google Magika, a real AI-powered file-detection model, only when that header is missing. This article covers exactly how the two-path flow works, why a wrong or missing MIME type is a bigger problem than it sounds, and what Magika actually is under the hood.

TL;DR:

  • If an upload includes a Content-Type header, AIOZ Storage uses that value as the object's MIME type, no detection involved.
  • If it's missing, AIOZ Storage detects the file type from its actual content using Google Magika, then stores the result as retrievable object metadata.
  • Magika is a real, published Google tool, a deep-learning model a few megabytes in size, running inference in about 5 milliseconds per file with roughly 99% accuracy across 200+ content types.

The Two-Path Flow: Supplied vs Detected

AIOZ's own announcement describes the mechanism directly: "If an upload request includes a Content-Type header, AIOZ Storage uses that value as the object's MIME type. If it is missing, the file type is detected from content and stored as object metadata." That's the whole flow in two sentences, and it's worth noticing what it doesn't do: it never overrides a Content-Type a client actually sent, correct or not. Detection is strictly a fallback for the missing case, not a validation or correction layer for values that are present but wrong.

Why This Actually Matters: What MIME Type Controls

A MIME type isn't cosmetic metadata, it's the value that tells a browser, a CDN, or any HTTP client how to actually handle a file once it's downloaded. An image object stored with the wrong or missing content type can arrive as a generic binary download instead of rendering inline; a PDF can prompt a save dialog instead of opening in a viewer; a JSON file served as text/plain can behave differently in a client expecting application/json. Object storage's simplicity, everything is just bytes under a key, is exactly what makes this easy to get wrong: unlike a web server that inspects file extensions by convention, a raw PutObject call to any S3-compatible API has no required content-type field at all, it's entirely on the caller to set one correctly, and plenty of upload paths simply don't.

When Content-Type Actually Goes Missing

This isn't a rare edge case. Plenty of real upload paths never set a Content-Type explicitly: a script calling a raw S3 client library directly, an internal tool generating files programmatically and shipping them straight to a bucket, or any integration where the developer never thought to add the header because the S3 API doesn't require it. Every SDK and CLI path covered elsewhere in this series is capable of uploading with or without a content type set, it depends entirely on whether the calling code passes one. Automatic detection exists specifically to catch the gap those omissions leave behind, rather than leaving an object's type as generic or blank indefinitely.

Server room aisle with rows of dark server racks

What's Actually Running: Google Magika

The detection engine itself isn't an AIOZ-built heuristic, it's Google's own Magika, described in Google's own repository as "a novel AI-powered file type detection tool that relies on the recent advance of deep learning to provide accurate detection." That's a meaningfully different approach from the two classic ways to guess a file's type, trusting the file extension (easily wrong or absent) or checking a fixed table of magic-byte signatures (brittle against anything not in the table). Magika instead runs a trained model against the file's actual content.

Google's own numbers for the model are specific: "the inference time is about 5ms per file, even when run on a single CPU," with the model itself weighing "only a few MBs," and an average of roughly 99% accuracy on Google's test set, trained across "~100M samples across 200+ content types." That combination, small, fast, and broad in coverage, is what makes running content-based detection on every upload with a missing content type practical rather than a meaningful latency cost.

Where the Detected Type Actually Ends Up

Once detection runs, AIOZ's announcement is specific about the result: the file type "is detected from content and stored as object metadata." That means the outcome isn't a one-time decision thrown away after the upload finishes, it's a persistent, retrievable property of the object, the same metadata slot a client-supplied Content-Type would have occupied. Anything reading that object back later, an application, a browser, a CDN, gets the correct type whether it came from an explicit header or Magika's detection.

What AIOZ's Announcement Doesn't Specify

Worth being direct about the boundaries here, since AIOZ's own announcement is brief. It doesn't state whether existing objects uploaded before May 19, 2026, without a content type get retroactively scanned, the described flow is upload-time behavior, and nothing in the announcement suggests a backfill process for objects already sitting in a bucket. It also doesn't document a way to force re-detection on an object that already has an (incorrect) Content-Type set, since the priority-based flow only reaches for detection when the header is absent entirely. If either of those matters for your use case, that's a real gap worth testing directly rather than assuming either way.

Frequently Asked Questions

What is automatic MIME type detection on AIOZ Storage?
A fallback mechanism that identifies a file's type from its actual content, using Google Magika, whenever an upload doesn't include a Content-Type header. If the header is present, AIOZ Storage uses that value directly instead.

What is Google Magika?
A real, published AI-powered file-type detection tool from Google, using a small deep-learning model, a few megabytes in size, that runs inference in about 5 milliseconds per file with roughly 99% accuracy across more than 200 content types.

Does AIOZ Storage override a Content-Type I set myself?
No. Detection only runs when the Content-Type header is missing entirely. A value you explicitly send is used as-is, correct or not.

Why would a file be uploaded without a Content-Type in the first place?
The S3 API doesn't require it. A raw PutObject call through any SDK or CLI can succeed with no content-type field set at all, it depends entirely on whether the calling code passes one, which plenty of scripts and internal tools simply don't.

Where does the detected MIME type get stored?
As retrievable object metadata, the same slot a client-supplied Content-Type header would occupy. Anything reading the object back afterward sees the correct type either way.

Does this apply to objects uploaded before the feature shipped?
Not documented. AIOZ's announcement describes upload-time behavior only, with no mention of a backfill or retroactive scan for objects already stored before May 19, 2026.

When did AIOZ Storage add automatic MIME type detection?
May 19, 2026, according to AIOZ's own announcement.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

How to Build an MCP Server for AIOZ Storage, Step by Step

AIOZ Storage has no official MCP server yet. Here is a working MCP server for AIOZ Storage, built with the official Python SDK and boto3, tools included.

aioz-storage
6 min readSeptember 19, 2026
blog thumbnail

What Is an MCP Server? How AI Agents Access Storage

What is an MCP server: a standard letting AI agents like Claude use tools and data through one protocol. How MinIO and Azure apply it to object storage.

aioz-storage
6 min readSeptember 16, 2026
blog thumbnail

S3 Access Logs vs CloudTrail: Which Should You Use?

S3 access logs vs CloudTrail: AWS recommends CloudTrail, but each one catches real events the other misses. Speed, cost, and coverage, compared directly.

aioz-storage
5 min readSeptember 15, 2026
blog thumbnail

Eventual vs Strong Consistency: How S3 Made the Switch

Eventual vs strong consistency: whether a read right after a write sees the new data immediately. S3 ran on the first model for 14 years, then changed it.

aioz-storage
6 min readSeptember 14, 2026
blog thumbnail

Bucket Policy vs IAM Policy: What Is the Real Difference?

Bucket policy vs IAM policy: one attaches to the resource, one attaches to the identity. What each can do that the other can't, and how S3 evaluates both.

aioz-storage
6 min readSeptember 13, 2026
blog thumbnail

SSE-S3 vs SSE-KMS vs SSE-C: S3 Encryption Types Explained

SSE-S3 vs SSE-KMS vs SSE-C: who manages the encryption key, and what that decision actually costs you. Includes the real 2026 default change to SSE-C.

aioz-storage
6 min readSeptember 12, 2026