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

NCP 리스트 API 버전업 #144

Merged
merged 5 commits into from
Nov 30, 2023
Merged

NCP 리스트 API 버전업 #144

merged 5 commits into from
Nov 30, 2023

Conversation

msjang4
Copy link
Collaborator

@msjang4 msjang4 commented Nov 29, 2023

resolved: #143

작업 내용

  • prefix로 시작하는 오브젝트 이름에만 응답하도록 제한가능
  • 기존 V1대신 ListObjectsV2 API 사용

전달 사항

  • 사용법
return listObjects(process.env.OUTPUT_BUCKET, {
   prefix: 'movemove/${videoId}',
});

@msjang4 msjang4 self-assigned this Nov 29, 2023
@msjang4 msjang4 requested a review from 5tarry November 29, 2023 16:46
@msjang4 msjang4 added backend feat 새로운 기능 추가 labels Nov 29, 2023
@msjang4 msjang4 added this to the Week 4 milestone Nov 29, 2023
@msjang4 msjang4 changed the title Feat/prefix list object NCP 리스트 API 버전업 Nov 29, 2023
5tarry
5tarry previously approved these changes Nov 30, 2023
@@ -16,6 +18,7 @@ export const listObjects = async (bucketName: string) => {
};

const method = 'GET';
Object.assign(params, { 'list-type': 2 });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GET /apiary?list-type=2 처럼 보내고 params에 따로 추가하지 않으면 동작이 안되는걸까요??

Comment on lines +36 to +37
.then((response): any => xml2js(response.data, { compact: true }))
.then((element) => _.map(element.ListBucketResult.Contents, 'Key._text'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@msjang4 msjang4 merged commit 6c5a79d into develop Nov 30, 2023
@msjang4 msjang4 deleted the feat/prefix_listObject branch December 11, 2023 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend feat 새로운 기능 추가
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Backend] NCP 리스트 API 수정
2 participants