Search code examples
box-apibox

Getting the mime type Box api without using a separate head request?


Is there a way to get the mime type of a file from box.com from just the metadata? Or are we stuck making a HEAD request?


Solution

  • The Box API doesn't expose file MIME types. You'll have to infer it from the file extension. Here's a listing of the available properties on file objects.