简体   繁体   中英

How to get an object (image) from S3 using s3fs in NodeJs?

I was able to put objects into my S3 bucket using the s3fs module , but I can't find a way to retrieve those objects. Specifically, I want to retrieve an object by it's key, and I want to get a URL of that object which I would send back to the client to be rendered in an img tag. Any help would be appreciated!

When your bucket is mounted via S3FS, you could use shell command to retrieve files(objects) in the mountpoint, eg /mnt/bucket-name , and use system call to operate files include retrieving.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM