英文:
Show images from Amazon S3 private bucket in frontend using Node js Vue js
问题
我尝试从Amazon S3图像获取缓冲区,然后将其转换为Base64字符串并发送到前端。它运行良好,可以在页面上显示图像,但问题在于Base64处理时间太长。如何制定一个比Base64快得多的解决方法?
英文:
i tried getting the Buffer from Amazon S3 image then i converted into base64 string and sent to the frontend.
It worked well, it shows the image in the page, but the problem is the long time of proccesing base64.
How to make a workaround which will be much faster than base64?
答案1
得分: 0
你可以为每个图像生成S3签名URL链接,然后将这些链接发送到前端。现在,前端可以分别调用以获取所有图像。
这将减少后端处理所需的时间。
英文:
You can generate s3 signed URL link for each image and send the links to the front end. Now, the front end can make respective calls to fetch all images.
This will reduce the time that backend does for the processing.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论