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