Skip to content

Commit a8705b6

Browse files
committed
v3
1 parent 83a3b42 commit a8705b6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/convertapi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default class ConvertApi {
1717

1818
constructor(
1919
public readonly authCredentials: string,
20-
public readonly host: string='v2.convertapi.com'
20+
public readonly host: string='api.convertapi.io'
2121
) {}
2222

2323
/**
@@ -40,7 +40,7 @@ export default class ConvertApi {
4040
public convert(fromFormat: string, toFormat: string, params: IParams): Promise<Result> {
4141
return Promise.resolve(params.dto)
4242
.then(dto => {
43-
return fetch(`https://${this.host}/convert/${fromFormat}/to/${toFormat}?storefile=true`,
43+
return fetch(`https://${this.host}/v3/convert/${fromFormat}/to/${toFormat}?storefile=true`,
4444
{
4545
method: 'POST',
4646
headers: {

src/file-param.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default class FileParam implements IParam {
3232
if (this.file instanceof FileValue) {
3333
return Promise.resolve(this.file.fileId)
3434
} else {
35-
let uploadUrl = `https://${this.host}/upload?`
35+
let uploadUrl = `https://${this.host}/v3/upload?`
3636
let response = this.file instanceof URL
3737
? fetch(`${uploadUrl}url=${encodeURIComponent(this.file.href)}`, <RequestInit>{ method: 'POST' })
3838
: fetch(`${uploadUrl}filename=${encodeURIComponent(this.file.name)}`, <RequestInit>{ method: 'POST', body: this.file })

0 commit comments

Comments
 (0)