Temporally disable image services

This commit is contained in:
KoalaSat 2023-11-28 14:57:20 +01:00
parent 2f23459dbd
commit 8ab13a0b6a
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157
4 changed files with 18 additions and 15 deletions

View File

@ -11,18 +11,18 @@ export const imageHostingServices: Record<
sendFunction: (fileUri: string, fileType: string, filename: string) => Promise<string | null>
}
> = {
voidCat: {
uri: 'https://void.cat',
uploadUrl: 'https://void.cat/upload',
donation: 'https://void.cat/donate',
sendFunction: voidCatUpload,
},
nostrBuild: {
uri: 'https://nostr.build',
uploadUrl: 'https://nostr.build/upload.php',
donation: 'https://nostr.build',
sendFunction: nostrBuildUpload,
},
// voidCat: {
// uri: 'https://void.cat',
// uploadUrl: 'https://void.cat/upload',
// donation: 'https://void.cat/donate',
// sendFunction: voidCatUpload,
// },
// nostrBuild: {
// uri: 'https://nostr.build',
// uploadUrl: 'https://nostr.build/upload.php',
// donation: 'https://nostr.build',
// sendFunction: nostrBuildUpload,
// },
nostrcheck: {
uri: 'https://nostrcheck.me',
uploadUrl: 'https://nostrcheck.me/api/media.php',

View File

@ -26,7 +26,8 @@ export const nostrBuildUpload: (
const imageUrl: string = response.data.match(regExp)[0].slice(0, -4)
resolve(imageUrl)
})
.catch(() => {
.catch((e) => {
console.log(e)
reject(new Error('Error uploading image'))
})
})

View File

@ -32,7 +32,8 @@ export const voidCatUpload: (
reject(new Error('Error uploading image'))
}
})
.catch(() => {
.catch((e) => {
console.log(e)
reject(new Error('Error uploading image'))
})
})

View File

@ -27,7 +27,8 @@ export const nostrcheckUpload: (
const imageUrl: string = response.data.URL
resolve(imageUrl)
})
.catch(() => {
.catch((e) => {
console.log(e)
reject(new Error('Error uploading image'))
})
})