File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 : {
Original file line number Diff line number Diff 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 } )
You can’t perform that action at this time.
0 commit comments