-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#697 AWS-SDK V3으로 마이그레이션 #698
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for taxi-dev-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
if (data.url) { | ||
const res = await axiosOri({ | ||
url: data.url, | ||
method: "put", | ||
headers: { | ||
"Content-Type": image.type, | ||
}, | ||
data: image, | ||
}); | ||
if (res.status === 200) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흠.. 채팅 사진 업로드는 코드 수정이 없어도 되나요?? @predict-woo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@14KGun 헉 맞는 말이에요 수정하겠습니다
@predict-woo conflict 가 있어요! |
@14KGun 수정했습니다! |
const { url, fields, id } = await axios({ | ||
const { url, id } = await axios({ | ||
url: "chats/uploadChatImg/getPUrl", | ||
method: "post", | ||
data: { roomId, type: file.type }, | ||
}); | ||
if (!url || !fields || !id) throw new Error(); | ||
if (!url || !id) throw new Error(); | ||
|
||
const { status: s3Status } = await axiosOri({ | ||
url, | ||
method: "put", | ||
data: file, | ||
headers: { "Content-Type": file.type }, | ||
}); | ||
|
||
const formData = new FormData(); | ||
for (const key in fields) formData.append(key, fields[key]); | ||
formData.append("file", file); | ||
const { status: s3Status } = await axiosOri.post(url, formData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@predict-woo @cokia #323 이거 채팅 이미지 업로드가 되지 않는데, 에서 채팅 이미지 업로드 쪽 코드 수정은 아직 되지 않은 것 같긴 합니다??
25a4201
to
2d6bc84
Compare
Axios는 기본적으로 2xx 상태체크를 하고, 에러가 나는 경우 AxiosError 객체를 Throw합니다. 따라서, 필요없는 상태 체크 코드들을 제거 했습니다. |
Summary
It closes #697
Images or Screenshots
Further Work