From a8705b66fc5258640420b5bce3a956ebebee0fe2 Mon Sep 17 00:00:00 2001 From: Jonas Jasas Date: Thu, 15 Jan 2026 13:22:56 +0200 Subject: [PATCH] v3 --- src/convertapi.ts | 4 ++-- src/file-param.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/convertapi.ts b/src/convertapi.ts index b7c78c5..ce241fb 100644 --- a/src/convertapi.ts +++ b/src/convertapi.ts @@ -17,7 +17,7 @@ export default class ConvertApi { constructor( public readonly authCredentials: string, - public readonly host: string='v2.convertapi.com' + public readonly host: string='api.convertapi.io' ) {} /** @@ -40,7 +40,7 @@ export default class ConvertApi { public convert(fromFormat: string, toFormat: string, params: IParams): Promise { return Promise.resolve(params.dto) .then(dto => { - return fetch(`https://${this.host}/convert/${fromFormat}/to/${toFormat}?storefile=true`, + return fetch(`https://${this.host}/v3/convert/${fromFormat}/to/${toFormat}?storefile=true`, { method: 'POST', headers: { diff --git a/src/file-param.ts b/src/file-param.ts index 2e74b43..5367175 100644 --- a/src/file-param.ts +++ b/src/file-param.ts @@ -32,7 +32,7 @@ export default class FileParam implements IParam { if (this.file instanceof FileValue) { return Promise.resolve(this.file.fileId) } else { - let uploadUrl = `https://${this.host}/upload?` + let uploadUrl = `https://${this.host}/v3/upload?` let response = this.file instanceof URL ? fetch(`${uploadUrl}url=${encodeURIComponent(this.file.href)}`, { method: 'POST' }) : fetch(`${uploadUrl}filename=${encodeURIComponent(this.file.name)}`, { method: 'POST', body: this.file })