File tree 6 files changed +14
-1
lines changed
6 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ export type FileExtension =
166
166
| 'fbx'
167
167
| 'vsdx'
168
168
| 'vtt'
169
+ | 'apk'
169
170
; // eslint-disable-line semi-style
170
171
171
172
export type MimeType =
@@ -318,6 +319,7 @@ export type MimeType =
318
319
| 'application/vnd.iccprofile'
319
320
| 'application/x.autodesk.fbx'
320
321
| 'application/vnd.visio'
322
+ | 'application/vnd.android.package-archive'
321
323
; // eslint-disable-line semi-style
322
324
323
325
export type FileTypeResult = {
Original file line number Diff line number Diff line change @@ -404,6 +404,13 @@ export class FileTypeParser {
404
404
zipHeader . filename = await tokenizer . readToken ( new Token . StringType ( zipHeader . filenameLength , 'utf-8' ) ) ;
405
405
await tokenizer . ignore ( zipHeader . extraFieldLength ) ;
406
406
407
+ if ( / c l a s s e s \d * \. d e x / . test ( zipHeader . filename ) ) {
408
+ return {
409
+ ext : 'apk' ,
410
+ mime : 'application/vnd.android.package-archive' ,
411
+ } ;
412
+ }
413
+
407
414
// Assumes signed `.xpi` from addons.mozilla.org
408
415
if ( zipHeader . filename === 'META-INF/mozilla.rsa' ) {
409
416
return {
Original file line number Diff line number Diff line change 216
216
" icc" ,
217
217
" fbx" ,
218
218
" vsdx" ,
219
- " vtt"
219
+ " vtt" ,
220
+ " apk"
220
221
],
221
222
"dependencies" : {
222
223
"get-stream" : " ^9.0.1" ,
Original file line number Diff line number Diff line change @@ -398,6 +398,7 @@ abortController.abort(); // Abort file-type reading from the Blob stream.
398
398
- [` alias` ](https://en.wikipedia.org/wiki/Alias_%28Mac_OS%29) - macOS Alias file
399
399
- [` amr` ](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) - Adaptive Multi-Rate audio codec
400
400
- [` ape` ](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio
401
+ - [` apk` ](https://en.wikipedia.org/wiki/Apk_(file_format)) - Android package format
401
402
- [` apng` ](https://en.wikipedia.org/wiki/APNG) - Animated Portable Network Graphics
402
403
- [` ar` ](https://en.wikipedia.org/wiki/Ar_(Unix)) - Archive file
403
404
- [` arj` ](https://en.wikipedia.org/wiki/ARJ) - Archive file
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ export const extensions = [
153
153
'fbx' ,
154
154
'vsdx' ,
155
155
'vtt' ,
156
+ 'apk' ,
156
157
] ;
157
158
158
159
export const mimeTypes = [
@@ -305,4 +306,5 @@ export const mimeTypes = [
305
306
'application/vnd.iccprofile' ,
306
307
'application/x.autodesk.fbx' , // Invented by us
307
308
'application/vnd.visio' ,
309
+ 'application/vnd.android.package-archive' ,
308
310
] ;
You can’t perform that action at this time.
0 commit comments