mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-18 06:20:29 +00:00
refactor: 提高解析兼容
This commit is contained in:
parent
9fcfb5493c
commit
2531b08538
@ -195,11 +195,13 @@ export async function checkUriType(Uri: string) {
|
|||||||
return { Uri: uri, Type: FileUriType.Remote };
|
return { Uri: uri, Type: FileUriType.Remote };
|
||||||
}
|
}
|
||||||
// 再判断是否是Base64
|
// 再判断是否是Base64
|
||||||
if (uri.startsWith('base64://')) {
|
if (uri.startsWith('base64:')) {
|
||||||
return { Uri: uri, Type: FileUriType.Base64 };
|
return { Uri: uri, Type: FileUriType.Base64 };
|
||||||
}
|
}
|
||||||
if (uri.startsWith('file://')) {
|
if (uri.startsWith('file:')) {
|
||||||
let filePath: string = uri.slice(7);
|
let filePath: string = uri.slice(7);
|
||||||
|
// file://C:\1.jpg
|
||||||
|
// file:///test/1.jpg
|
||||||
return { Uri: filePath, Type: FileUriType.Local };
|
return { Uri: filePath, Type: FileUriType.Local };
|
||||||
}
|
}
|
||||||
if (uri.startsWith('data:')) {
|
if (uri.startsWith('data:')) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user