대가는 결과를 만든다

[이슈] aws s3 directory 개념의 삭제 본문

카테고리 없음

[이슈] aws s3 directory 개념의 삭제

yunzema 2019. 10. 17. 17:20
반응형

s3 콘솔이나, 파일경로를 보면 s3에 directory로 구성되는거 같지만 s3에는 directory개념이 없다. 모든 것이 하나의 파일 객체의 개념이다.

 따라서 directory를 삭제 하듯이 해당 경로 하위 파일 객체들과 함께 모두 지우기 위해서는 경로 하위에 존재하는 파일객체 목록을 조회한 후 deleteObject가 아닌 deleteObjects로 일괄 제거해야 한다.

 

https://stackoverflow.com/questions/20207063/how-can-i-delete-folder-on-s3-with-node-js

 

How can I delete folder on s3 with node.js?

Yes, I know. There is no folder concept on s3 storage. but I really want to delete a specific folder from s3 with node.js. I tried two solutions, but both didn't work. My code is below: Solution 1:

stackoverflow.com

 

https://repl.it/@DrwHarris/Delete-S3-Folder

 

Delete S3 Folder

Powerful and simple online compiler, IDE, interpreter, and REPL. Code, compile, and run code in 50+ programming languages: Clojure, Haskell, Kotlin (beta), QBasic, Forth, LOLCODE, BrainF, Emoticon, Bloop, Unlambda, JavaScript, CoffeeScript, Scheme, APL, Lu

repl.it

 

Comments