Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
PUT Function :
public createOrUpdateResource(path: string, type: string, data: Blob): Promise<Response> {
return fetch(`${this.apiUrl}${path}`, {
method: 'PUT',
headers: this.createHeaders({
'content-type': type,
}),
body: data,
})
Above function returning correct response url which I am passing to below function to generate public url
public getpublicurl(href: string, abortController?: AbortController): Promise<Response> {
return fetch(`${href}/assets/:link`, {
method: 'GET',
headers: this.createHeaders(),
signal: abortController?.signal,
})
}
Error in above function.