S31 Cloudflare r2 aws-sdk s3로 업로드 클플의 r2로 업로드 할때, api를 직접 구현하면 힘드니까 aws s3의 sdk를 이용하면 편리합니다. 약간 다른게 있다면, region이 "auto"여야 된다는점.credentials에 accessKeyId, secretAccessKey 말고도,endpoint를 설정해야 됩니다. 코드로 하면 아래처럼 됩니다.this.s3Client = new S3Client({ endpoint: appConfigType.r2.endPoint, credentials: { accessKeyId: appConfigType.r2.accessKeyId, secretAccessKey: appConfigType.r2.secretAccessKey, }, region: appConfig.. 스터디/Etc 2024. 10. 25. 이전 1 다음