diff --git a/src/providers/filebase.ts b/src/providers/filebase.ts index 1f3ed07..c9c08d8 100644 --- a/src/providers/filebase.ts +++ b/src/providers/filebase.ts @@ -15,7 +15,7 @@ export const uploadOnFilebase: UploadFunction = async ({ first, car, name, token const res = await uploadCar({ apiUrl: 's3.filebase.com', file, token, bucketName }) - if (verbose) logger.request('PUT', res.url, res.status) + if (verbose) logger.request('PUT', res.url, res.status, await res.text()) return { cid: res.headers.get('x-amz-meta-cid')!, status: 'queued' } } diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 88ae947..eec5065 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -24,9 +24,9 @@ export const logger = { success(...args: unknown[]) { console.log('✔', ...args) }, - request(method: 'GET' | 'POST' | 'PUT', url: string, status: number) { - if (isTTY) console.log('\n', method === 'GET' ? cyan(method) : green(method), url, responseStatus(status)) - else console.log('\n', method, url, status) + request(method: 'GET' | 'POST' | 'PUT', url: string, status: number, body?: unknown) { + if (isTTY) console.log('\n', method === 'GET' ? cyan(method) : green(method), url, responseStatus(status), body) + else console.log('\n', method, url, status, body) }, }