mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
fix mime
This commit is contained in:
@@ -10,11 +10,14 @@ class FileType {
|
|||||||
if(ext.startsWith('.')) {
|
if(ext.startsWith('.')) {
|
||||||
ext = ext.substring(1);
|
ext = ext.substring(1);
|
||||||
}
|
}
|
||||||
if(ext == 'cbz') {
|
var mime = lookupMimeType('no-file.$ext') ?? 'application/octet-stream';
|
||||||
return const FileType('.cbz', 'application/octet-stream');
|
// Android doesn't support some mime types
|
||||||
}
|
mime = switch(mime) {
|
||||||
var mime = lookupMimeType('no-file.$ext');
|
'text/javascript' => 'application/javascript',
|
||||||
return FileType(".$ext", mime ?? 'application/octet-stream');
|
'application/x-cbr' => 'application/octet-stream',
|
||||||
|
_ => mime,
|
||||||
|
};
|
||||||
|
return FileType(".$ext", mime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
pubspec.lock
12
pubspec.lock
@@ -597,10 +597,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: mime
|
name: mime
|
||||||
sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
|
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.6"
|
version: "2.0.0"
|
||||||
mime_type:
|
mime_type:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -767,18 +767,18 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: share_plus
|
name: share_plus
|
||||||
sha256: "468c43f285207c84bcabf5737f33b914ceb8eb38398b91e5e3ad1698d1b72a52"
|
sha256: "9c9bafd4060728d7cdb2464c341743adbd79d327cb067ec7afb64583540b47c8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.2"
|
version: "10.1.2"
|
||||||
share_plus_platform_interface:
|
share_plus_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: share_plus_platform_interface
|
name: share_plus_platform_interface
|
||||||
sha256: "6ababf341050edff57da8b6990f11f4e99eaba837865e2e6defe16d039619db5"
|
sha256: c57c0bbfec7142e3a0f55633be504b796af72e60e3c791b44d5a017b985f7a48
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.0"
|
version: "5.0.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@@ -32,7 +32,7 @@ dependencies:
|
|||||||
git:
|
git:
|
||||||
url: https://github.com/wgh136/photo_view
|
url: https://github.com/wgh136/photo_view
|
||||||
ref: 94724a0b
|
ref: 94724a0b
|
||||||
mime: ^1.0.5
|
mime: ^2.0.0
|
||||||
share_plus: ^10.0.2
|
share_plus: ^10.0.2
|
||||||
scrollable_positioned_list:
|
scrollable_positioned_list:
|
||||||
git:
|
git:
|
||||||
|
Reference in New Issue
Block a user