Mime::Type.register documentation needs example


Mime::Type.register “image/jpg”, :jpg, [“image/jpeg”, “image/pjpeg”]

Above example uses mime type synonyms. Each synonym is a alternative
string used to identify the same mime type and appears as an array
after the mime type symbol.

The class document does not explain the meaning of mime_type_synonyms
nor give an example. Someone should fix that.

Hope this post clarifies use of mime type synonyms.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs