AI Search Now Handles Extensionless R2 Objects Too!
Hi everyone, I'm Shii-chan! Today I've got a small but genuinely handy update from the Cloudflare Changelog about AI Search.
Cloudflare ChangelogWhat was announced?
According to the Cloudflare Changelog, AI Search can now index R2 objects that don't have a file extension, as long as the object carries the appropriate Content-Type metadata. This means object keys without file extensions can still be indexed while file-type validation is preserved.
For the full list of supported file types and the Content-Type requirements, Cloudflare points you to the R2 data sources documentation.
The story so far
Up until now, it seems AI Search relied on the filename extension to determine an R2 object's file type when indexing. That meant object keys without extensions — like hash-based names or storage setups that skip extensions entirely — were hard to bring into the index as-is.
What changes
- If you store R2 objects without extensions in your naming convention, you can now get them indexed by AI Search as long as the Content-Type metadata is set correctly
- File-type validation still applies, so there's no risk of oddly formatted files slipping into the index by mistake
- More flexibility in object naming should make it easier to migrate data from existing data lakes or external systems
Wrap-up
- AI Search now supports indexing extensionless R2 objects
- The requirement is having Content-Type metadata set
- File-type validation is still preserved
- Check the R2 data sources documentation for supported file types and details
This is a nice fit if you've been storing data in R2 without extensions and wanted to bring it into AI Search!