axios+telemetry cleanup

This commit is contained in:
2026-04-02 15:19:11 +03:00
parent a3cbca1e11
commit 7e1eac8002
100 changed files with 3048 additions and 4491 deletions

View File

@@ -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) {