File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1+ # 1.3.20 - 24 Aug 2025
2+ Change:
3+ - mime is undefined when using ` Elysia.file ` in Web Standard Adapter
4+
15# 1.3.19 - 24 Aug 2025
26Change:
37- [ #1357 ] ( https://github.com/elysiajs/elysia/issues/1357 ) return ` Response ` proxy as-is
Original file line number Diff line number Diff line change 11{
22 "name" : " elysia" ,
33 "description" : " Ergonomic Framework for Human" ,
4- "version" : " 1.3.19 " ,
4+ "version" : " 1.3.20 " ,
55 "author" : {
66 "name" : " saltyAom" ,
77 "url" : " https://github.com/SaltyAom" ,
Original file line number Diff line number Diff line change @@ -4,12 +4,10 @@ import {
44 createResponseHandler ,
55 createStreamHandler ,
66 handleFile ,
7- handleSet ,
8- responseToSetHeaders ,
9- streamResponse
7+ handleSet
108} from '../utils'
119
12- import { ElysiaFile } from '../../universal/file'
10+ import { ElysiaFile , mime } from '../../universal/file'
1311import { isNotEmpty } from '../../utils'
1412import { Cookie } from '../../cookies'
1513import { ElysiaCustomStatusResponse } from '../../error'
@@ -24,8 +22,9 @@ const handleElysiaFile = (
2422 }
2523) => {
2624 const path = file . path
27- // @ts -ignore
28- const contentType = mime [ path . slice ( path . lastIndexOf ( '.' ) + 1 ) ]
25+ const contentType =
26+ mime [ path . slice ( path . lastIndexOf ( '.' ) + 1 ) as any as keyof typeof mime ]
27+
2928 if ( contentType ) set . headers [ 'content-type' ] = contentType
3029
3130 if (
You can’t perform that action at this time.
0 commit comments