axios+telemetry cleanup
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
import { feature } from 'bun:bundle'
|
||||
import axios from 'axios'
|
||||
import { nativeRequest } from '../../utils/http.js'
|
||||
import { randomUUID } from 'crypto'
|
||||
import { readFile } from 'fs/promises'
|
||||
import { basename, extname } from 'path'
|
||||
@@ -137,7 +137,9 @@ export async function uploadBriefAttachment(
|
||||
])
|
||||
|
||||
try {
|
||||
const response = await axios.post(url, body, {
|
||||
const response = await nativeRequest(url, {
|
||||
method: 'POST',
|
||||
body,
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
'Content-Type': `multipart/form-data; boundary=${boundary}`,
|
||||
@@ -145,7 +147,6 @@ export async function uploadBriefAttachment(
|
||||
},
|
||||
timeout: UPLOAD_TIMEOUT_MS,
|
||||
signal: ctx.signal,
|
||||
validateStatus: () => true,
|
||||
})
|
||||
|
||||
if (response.status !== 201) {
|
||||
|
||||
Reference in New Issue
Block a user