diff --git a/src/config/config.ts b/src/config/config.ts index 61fff74..3f20e29 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -1,6 +1,7 @@ import axios, { AxiosError, InternalAxiosRequestConfig } from "axios"; -export const baseURL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3344"; +export const baseURL = + process.env.NEXT_PUBLIC_API_URL_ROOT || process.env.NEXT_PUBLIC_API_URL || "http://localhost:3344"; export const api = axios.create({ baseURL, diff --git a/src/service/mediaService.ts b/src/service/mediaService.ts index 9655eff..a078560 100644 --- a/src/service/mediaService.ts +++ b/src/service/mediaService.ts @@ -52,20 +52,18 @@ export const uploadFileToS3 = async ( file: File, presigned: PreSignedResponse, ) => { - const res = await axios.put(presigned.upload_url, file, { + await axios.put(presigned.upload_url, file, { headers: { ...presigned.signed_headers, "Content-Type": file.type, }, }); - // console.log("Response from S3 upload:", res); }; export const confirmUpload = async (token_id: string) => { const res = await api.post("/media/presigned/complete", { token_id, }); - // console.log("Response from confirm upload:", res); return res.data; };