Skip to content
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

Image Upload API #170

Open
JinHoooooou opened this issue Nov 13, 2021 · 0 comments
Open

Image Upload API #170

JinHoooooou opened this issue Nov 13, 2021 · 0 comments
Assignees
Labels
API api 개발

Comments

@JinHoooooou
Copy link
Contributor

JinHoooooou commented Nov 13, 2021

문제

  • Markdown Editor에 이미지를 첨부 할 수 있어야한다.

해결

  • 요청받은 이미지 정보를 s3에 업로드 후 이미지 URL을 응답으로 제공한다.

조건

절차

  1. request body의 image를 s3에 업로드한다.
  2. 업로드된 이미지의 url을 구성한다.
  3. response_body에 url을 실어 보낸다.

인수테스트

  1. 디테일 뷰로 이동
    • 메인 뷰에서 생성된 Note 클릭
  2. "add page" 버튼 클릭
  3. "contents"에 해당하는 form에 '이미지 첨부' 또는 이미지 '드래그 앤 드롭'
  4. 해당 이미지 s3에 업로드
  5. 업로드된 이미지 URL 렌더링

API Docs

Auth : Bearer JWT

Req

POST {BASE_URL}/actions/images/

request body
{
	"img_data": ???? // 프론트와 상의  수정
}

Res

200 OK

{"url" : "https://d2af9nad0zcf09.cloudfront.net/temp/dog.png"} // url의 형태는 바뀔  있음
@JinHoooooou JinHoooooou added the API api 개발 label Nov 17, 2021
@JinHoooooou JinHoooooou self-assigned this Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API api 개발
Projects
None yet
Development

No branches or pull requests

1 participant