fix: enhance content-type handling in downloadRisuHub function
This commit is contained in:
@@ -1668,9 +1668,9 @@ export async function downloadRisuHub(id:string, arg:{
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(res.headers.get('content-type') === 'image/png' || res.headers.get('content-type') === 'application/zip'){
|
if(res.headers.get('content-type') === 'image/png' || res.headers.get('content-type') === 'application/zip' || res.headers.get('content-type') === 'application/charx'){
|
||||||
let db = getDatabase()
|
let db = getDatabase()
|
||||||
if(res.headers.get('content-type') === 'application/zip'){
|
if(res.headers.get('content-type') === 'application/zip' || res.headers.get('content-type') === 'application/charx'){
|
||||||
console.log('zip')
|
console.log('zip')
|
||||||
await importCharacterProcess({
|
await importCharacterProcess({
|
||||||
name: 'realm.charx',
|
name: 'realm.charx',
|
||||||
@@ -1715,6 +1715,7 @@ export async function downloadRisuHub(id:string, arg:{
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
console.log(error.stack)
|
||||||
alertError("Error while importing")
|
alertError("Error while importing")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user