Content-Type一览

本文提供了一张方便查找的MIME类型表,详细列出了不同类型的文件扩展名及其对应的MIME类型,覆盖了文本、图像、音频、视频等多类文件格式。
     Multipart Internet Mail Extensions (MIME) 
关于Content-Type的一张表.(方便查找了哦)
http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html

Description of Data Content
Typical Filename Extensions


MIME type/subtype
    
Text and Text-Related Types   
HTML text data (RFC 1866)html htm text/html
Plain text: documents; program listingstxt c c++ pl cc h text/plain
Richtext (obsolete - replaced by text/enriched)  text/richtext
Structure enhanced text(etx?) text/x-setext
Enriched text markup (RFC 1896)  text/enriched
Tab-separated values (tabular)(tsv?) text/tab-separated-values
SGML documents (RFC 1874)  text/sgml
Speech synthesis data (MVP Solutions)talk text/x-speech
    
Document Stylesheet Types   
Cascading Stylesheetscss text/css
DSSSL-online stylesheets  application/dsssl(proposed)
    
Image Types   
GIFgif image/gif
X-Windows bitmap (b/w)xbm image/x-xbitmap
X-Windows pixelmap (8-bit color)xpm image/x-xpixmap
Portable Network Graphicspng image/x-png
Image Exchange Format (RFC 1314)ief image/ief
JPEGjpeg jpg jpe image/jpeg
TIFFtiff tif image/tiff
RGBrgb image/rgb
   image/x-rgb
Group III Fax (RFC 1494)g3f image/g3fax
X Windowdump formatxwd image/x-xwindowdump
Macintosh PICT formatpict image/x-pict
PPM (UNIX PPM package)ppm image/x-portable-pixmap
PGM (UNIX PPM package)pgm image/x-portable-graymap
PBM (UNIX PPM package)pbm image/x-portable-bitmap
PNM (UNIX PPM package)pnm image/x-portable-anymap
Microsoft Windows bitmapbmp image/x-ms-bmp
CMU rasterras image/x-cmu-raster
Kodak Photo-CDpcd image/x-photo-cd
Computer Graphics Metafilecgm image/cgm
North Am. Presentation Layer Protocol  image/naplps
CALS Type 1 or 2mil cal image/x-cals
Fractal Image Format (Iterated Systems)fif image/fif
QuickSilver active image (Micrografx)dsf image/x-mgx-dsf
CMX vector image (Corel)cmx image/x-cmx
Wavelet-compressed (Summus)wi image/wavelet
AutoCad Drawing (SoftSource)dwg image/vnd.dwg
   image/x-dwg
AutoCad DXF file (SoftSource)dxf image/vnd.dxf
   image/x-dxf
Simple Vector Format (SoftSource)svf image/vnd.svf
   also vector/x-svf
    
Audio/Voice/Music Related Types   
"basic"audio - 8-bit u-law PCMau snd audio/basic
Macintosh audio format (AIpple)aif aiff aifc audio/x-aiff
Microsoft audiowav audio/x-wav
MPEG audiompa abs mpega audio/x-mpeg
MPEG-2 audiomp2a mpa2 audio/x-mpeg-2
compressed speech (Echo Speech Corp.)es audio/echospeech
Toolvox speech audio (Voxware)vox audio/voxware
RapidTransit compressed audio (Fast Man)lcc application/fastman
Realaudio (Progressive Networks)ra ram application/x-pn-realaudio
NIFF music notation data format  application/vnd.music-niff
MIDI music datammid x-music/x-midi
Koan music data (SSeyo)skp application/vnd.koan
   application/x-koan
Speech synthesis data (MVP Solutions)talk text/x-speech
    
Video Types   
MPEG videompeg mpg mpe video/mpeg
MPEG-2 videompv2 mp2v video/mpeg-2
Macintosh Quicktimeqt mov video/quicktime
Microsoft videoavi video/x-msvideo
SGI Movie formatmovie video/x-sgi-movie
VDOlive streaming video (VDOnet)vdo video/vdo
Vivo streaming video (Vivo software)viv video/vnd.vivo
   video/vivo
Special HTTP/Web Application Types   
Proxy autoconfiguration (Netscape browsers)pac application/x-ns-proxy-autoconfig
See Chapter 6  application/x-www-form-urlencoded
See Chapter 9  application/x-www-local-exec
See Chapter 9 (Netscape extension)  multipart/x-mixed-replace
See Chapter 9 and Appendix B  multipart/form-data
Netscape Cooltalk chat data (Netscape)ice x-conference/x-cooltalk
Interactive chat (Ichat)  application/x-chat
    
Application Types   
    
Text-Related   
PostScriptai eps ps application/postscript
Microsoft Rich Text Formatrtf application/rtf
Adobe Acrobat PDFpdf application/pdf
   application/x-pdf
Maker Interchange Format (FrameMaker)mif application/vnd.mif
   application/x-mif
Troff documentt tr roff application/x-troff
Troff document with MAN macrosman application/x-troff-man
Troff document with ME macrosme application/x-troff-me
Troff document with MS macrosms application/x-troff-ms
LaTeX documentlatex application/x-latex
Tex/LateX documenttex application/x-tex
GNU TexInfo documenttexinfo texi application/x-texinfo
TeX dvi formatdvi application/x-dvi
MacWrite document?? application/macwriteii
MS word document?? application/msword
WordPerfect 5.1 document?? application/wordperfect5.1
SGML application (RFC 1874)  application/sgml
Office Document Architectureoda application/oda
Envoy Documentevy application/envoy
Wang Info. Tranfer Format (Wang)  application/wita
DEC Document Transfer Format (DEC)  application/dec-dx
IBM Document Content Architecture (IBM)  application/dca-rft
    
CommonGround Digital Paper (No Hands Software)  application/commonground
FrameMaker Documents (Frame)doc fm frm frame application/vnd.framemaker
   application/x-framemaker
Remote printing at arbitrary printers (RFC 1486)  application/remote-printing
    
Archive/Compressed Archives   
Gnu tar formatgtar application/x-gtar
4.3BSD tar formattar application/x-tar
POSIX tar formatustar application/x-ustar
Old CPIO formatbcpio application/x-bcpio
POSIX CPIO formatcpio application/x-cpio
UNIX sh shell archiveshar application/x-shar
DOS/PC - Pkzipped archivezip application/zip
Macintosh Binhexed archivehqx application/mac-binhex40
Macintosh Stuffit Archivesit sea application/x-stuffit
Fractal Image Formatfif application/fractals
Binary, UUencodedbin uu application/octet-stream
PC executableexe application/octet-stream
WAIS "sources"src wsrc application/x-wais-source
NCSA HDF data formathdf application/hdf
    
Downloadable Program/Scripts   
Javascript programjs ls mocha text/javascript
   application/x-javascript
VBScript program  text/vbscript
UNIX bourne shell programsh application/x-sh
UNIX c-shell programcsh application/x-csh
Perl programpl application/x-perl
Tcl (Tool Control Language) programtcl application/x-tcl
Atomicmail program scripts (obsolete)  application/atomicmail
Slate documents - executable enclosures (BBN)  application/slate
Undefined binary data (often executable progs)  application/octet-stream
RISC OS Executable programs (ANT Limited)  application/riscos
    
Animation/Multimedia   
Andrew Toolkit inset  application/andrew-inset
FutureSplash vector animation (FutureWave)spl application/futuresplash
mBED multimedia data (mBED)mbd application/mbedlet
Macromedia Shockwave (Macromedia)  application/x-director
Sizzler real-time video/animation  application/x-sprite
PowerMedia multimedia (RadMedia)rad application/x-rad-powermedia
    
Presentation   
PowerPoint presentation (Microsoft)ppz application/mspowerpoint
PointPlus presentation data (Net Scene)css application/x-pointplus
ASAP WordPower (Software Publishing Corp.)asp application/x-asap
Astound Web Player multimedia data (GoldDisk)asn application/astound
Special Embedded Object   
OLE script e.g. Visual Basic (Ncompass)axs application/x-olescript
OLE Object (Microsoft/NCompass)ods application/x-oleobject
OpenScape OLE/OCX objects (Business@Web)opp x-form/x-openscape
Visual Basic objects (Amara)wba application/x-webbasic
Specialized data entry forms (Alpha Software)frm application/x-alpha-form
client-server objects (Wayfarer Communications)wfx x-script/x-wfxclient
General Applications   
Undefined binary data (often executable progs)  application/octet-stream
CALS (U.S. D.O.D data format - RFC 1895)  application/cals-1840
Pointcast news data (Pointcast)pcn application/x-pcn
Excel spreadsheet (Microsoft)  application/vnd.ms-excel
   application/x-msexcel
   application/ms-excel
PowerPoint (Microsoft)ppt application/vnd.ms-powerpoint
   application/ms-powerpoint
Microsoft Project (Microsoft)  application/vnd.ms-project
Works data (Microsoft)  application/vnd.ms-works
MAPI data (Microsoft)  application/vnd.ms-tnef
Artgallery data (Microsoft)  application/vnd.artgalry
SourceView document (Dataware Electronics)svd application/vnd.svd
Truedoc (Bitstream)  application/vnd.truedoc
Net Install - software install (20/20 Software)ins application/x-net-install
Carbon Copy - remote control/access (Microcom)ccv application/ccv
Spreadsheets (Visual Components)vts workbook/formulaone
Cybercash digital money (Cybercash)  application/cybercash
Format for sending generic Macintosh files  application/applefile
Active message -- connect to active mail app.  application/activemessage
X.400 mail message body part (RFC 1494)  application/x400-bp
USENET news message id (RFC 1036)  application/news-message-id
USENET news message (RFC 1036)  application/news-transmission
    
Multipart Types (mostly email)   
Messages with multiple parts  multipart/mixed
Messages with multiple, alternative parts  multipart/alternative
Message with multiple, related parts  multipart/related
Multiple parts are digests  multipart/digest
For reporting of email status (admin.)  multipart/report
Order of parts does not matter  multipart/parallel
Macintosh file data  multipart/appledouble
Aggregate messages; descriptor as header  multipart/header-set
Container for voice-mail  multipart/voice-message
HTML FORM data (see Ch. 9 and App. B)  multipart/form-data
Infinite multiparts - See Chapter 9 (Netscape)  multipart/x-mixed-replace
    
Message Types (mostly email)   
MIME message  message/rfc822
Partial message  message/partial
Message containing external references  message/external-body
Message containing USENET news  message/news
HTTP message  message/http
    
2D/3D Data/Virtual Reality Types   
VRML data filewrl vrml x-world/x-vrml

(changing to model/vrml)

WIRL - VRML data (VREAM)vrw x-world/x-vream
Play3D 3d scene data (Play3D)p3d application/x-p3d
Viscape Interactive 3d world data (Superscape)svr x-world/x-svr
WebActive 3d data (Plastic Thought)wvr x-world/x-wvr
QuickDraw3D scene data (Apple)3dmf x-world/x-3dmf
    
Scientific/Math/CAD Types   
Chemical types -- to communicate information about chemical models  chemical/* (several subtypes)
Mathematica notebookma application/mathematica
Computational meshes for numerical simulationsmsh x-model/x-mesh

(evolving to model/mesh)

Vis5D 5-dimensional datav5d application/vis5d
IGES models -- CAD/CAM (CGM) dataigs application/iges

(evolving to model/iges?)

Autocad WHIP vector drawingsdwf drawing/x-dwf
    

Largely Platform-Specific Types
   

Silicon Graphics Specific Types
   
Showcase Presentationsshowcase slides sc sho show application/x-showcase
Insight Manual pagesins insight application/x-insight
Iris Annotator dataano application/x-annotator
Directory Viewerdir application/x-dirview
Software Licenselic application/x-enterlicense
Fax manager filefaxmgr application/x-fax-manager
Fax job data filefaxmgrjob application/x-fax-manager-job
IconBook dataicnbk application/x-iconbook
?wb application/x-inpview
Installable software in 'inst' formatinst application/x-install
Mail foldermail application/x-mailfolder
?pp ppages application/x-ppages
Data for printer (via lpr)sgi-lpr application/x-sgi-lpr
Software in 'tardist' formattardist application/x-tardist
Software in compressed 'tardist' formatztardist application/x-ztardist
WingZ spreadsheetwkz application/x-wingz
Open Inventor 3-D scenesiv graphics/x-inventor
// src/hooks/useGlobalState.ts import { useEffect, useState } from 'react'; interface GlobalState { is_listening: boolean; is_tts_playing: boolean; current_input_text: string; current_reply_text: string; last_command_result: any; mode: string; running: boolean; timestamp: number; } export function useGlobalState() { const [state, setState] = useState<GlobalState | null>(null); const [error] = useState<string | null>(null); let interval: ReturnType<typeof setInterval>; useEffect(() => { const fetchState = async () => { // 获取 state 数据的逻辑 try { const res = await fetch('/api/state'); const data = await res.json(); setState(data); } catch (err) { console.error('Failed to fetch state:', err); } }; // 启动轮询 interval = setInterval(fetchState, 1000); // 清理函数:组件卸载时清除定时器 return () => { if (interval) { clearInterval(interval); } }; }, []); return { state, error }; } // src/services/apiClient.ts import axios, { type AxiosInstance } from 'axios'; const API_BASE = 'http://127.0.0.1:5000'; const apiClient: AxiosInstance = axios.create({ baseURL: API_BASE, timeout: 15000, headers: { 'Content-Type': 'application/json', }, }); // 请求拦截器:添加 client type 和 mode(可从 context 获取) apiClient.interceptors.request.use((config) => { config.headers['X-Client-Type'] = config.headers['X-Client-Type'] || 'web'; return config; }); export default apiClient; // 单独导出用于文件上传(避免 JSON 化) export const uploadApi = axios.create({ baseURL: API_BASE, timeout: 30000, }); 这是api调用部分,你看一下有什么问题不
最新发布
10-31
按照这种方式import { request } from '@umijs/max'; /** 查询数据库列表 POST /connections/list */ export async function listUsingPost( body: { id?: number; database_name?: string; created_user_name?: string; current?: number; pageSize?: number; }, options?: { [key: string]: any }, ) { return request<{ code: number; info: { total: number; records: any[] }; msg: string; }>('/api/v1/connections/list', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}), }); } /** 测试数据库连接 POST /connections/test */ export async function testUsingPost( body: { name: string; host: string; port: number; username: string; password: string; databaseName: string; charset?: string; timeout?: number; isEnabled?: boolean; }, options?: { [key: string]: any }, ) { return request<{ code: number; msg: string }>('/api/v1/connections/test', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}), }); } /** 新增数据库连接 POST /connections/new */ export async function newUsingPost( body: { name: string; host: string; port: number; username: string; password: string; databaseName: string; charset?: string; isEnabled?: boolean; remark?: string; timeout?: number; created_user_id?: number; created_user_name?: string; }, options?: { [key: string]: any }, ) { return request<{ code: number; msg: string; info: any }>( '/api/v1/connections/new', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}), }, ); } /** 更新数据库连接 POST /connections/update/{id} */ export async function updateUsingPost( id: number, body: { name: string; host: string; port: number; username: string; password: string; databaseName: string; charset?: string; isEnabled?: boolean; remark?: string; timeout?: number; updated_user_id?: number; updated_user_name?: string; }, options?: { [key: string]: any }, ) { return request<{ code: number; msg: string }>( `/api/v1/connections/update/${id}`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}), }, ); } /** 删除数据库连接 POST /connections/delete/{id} */ export async function deleteUsingPost( id: number, options?: { [key: string]: any }, ) { return request<{ code: number; msg: string }>( `/api/v1/connections/delete/${id}`, { method: 'POST', ...(options || {}), }, ); } /** 获取数据库详情 GET /connections/{id} */ export async function detailUsingGet( id: number, options?: { [key: string]: any }, ) { return request<{ code: number; msg: string; info: any }>( `/api/v1/connections/${id}`, { method: 'GET', ...(options || {}), }, ); }
09-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值