Skip to content

Instantly share code, notes, and snippets.

@Nidal-Bakir
Last active March 9, 2025 13:30
Show Gist options
  • Save Nidal-Bakir/21a9d889474589551b718036a94792fc to your computer and use it in GitHub Desktop.
Save Nidal-Bakir/21a9d889474589551b718036a94792fc to your computer and use it in GitHub Desktop.
Common MIME types as const in go-lang
// MIT License
//
// Copyright (c) 2025 Nidal Bakir
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
package mimes
const (
// multipart
Multipart_form_data = "multipart/form-data" // multipart/form-data
// application
App_x_www_form_urlencoded = "application/x-www-form-urlencoded" // application/x-www-form-urlencoded
App_json = "application/json" // application/json
App_xml = "application/xml" // application/xml
App_zip = "application/zip" // application/zip
App_pdf = "application/pdf" // application/pdf
App_x_tar = "application/x-tar" // application/x-tar
App_msword = "application/msword" // pplication/msword "Microsoft Word"
App_octet_stream = "application/octet-stream" // application/octet-stream
App_x_7z_compressed = "application/x-7z-compressed" // application/x-7z-compressed
// text
Text_html = "text/html" // "text/html
Text_javascript = "text/javascript" // "text/javascript
Text_xml = "text/xml" // "text/xml
Text_plain = "text/plain" // "text/plain
Text_css = "text/css" // "text/css
Text_csv = "text/csv" // "text/csv
// image
Image_gif = "image/gif" // image/gif
Image_jpeg = "image/jpeg" // image/jpeg
Image_png = "image/png" // image/png
Image_webp = "image/webp" // image/webp
Image_svg_xml = "image/svg+xml" // image/svg+xml
// audio
Audio_aac = "audio/aac" // audio/aac
Audio_ogg = "audio/ogg" // audio/ogg
Audio_wav = "audio/wav" // audio/wav
Audio_webm = "audio/webm" // audio/webm
Audio_3gpp = "audio/3gpp" // audio/3gpp
Audio_3gpp2 = "audio/3gpp2" // audio/3gpp2
Audio_mpeg = "audio/mpeg" // audio/mpeg "mp3"
// video
Video_mpeg = "video/mpeg" // video/mpeg
Video_mp4 = "video/mp4" // video/mp4
Video_webm = "video/webm" // video/webm
Video_3gpp2 = "video/3gpp2" // video/3gpp2
Video_x_msvideo = "video/x-msvideo" // video/x-msvideo "avi"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment