Monday, February 1, 2021

Orbeon Forms can now determine files' mediatype based on the extension

When you attach a file to a form, as you might expect, the browser sends the content of the file to Orbeon Forms, but it also sends information about the file, including the file name, file size, and a description of the type of file it is sending called media type or MIME type. For instance, if you upload a JPEG image, the browser will tell the server that the media type of the file is image/jpeg.

However, there are times when the browser doesn't know the media type for a given file, and either doesn't provide that information to the server, or provides a generic media type, such as application/octet-stream. In those cases, starting in version 2020.1, Orbeon Forms infers the media type based on the file extension, thus increasing the likeliness that you end up with a correct media type.

For more on this, see the documentation section Mediatype determination.

No comments:

Post a Comment