[英]Show images from Amazon S3 private bucket in frontend using Node js Vue js
i tried getting the Buffer from Amazon S3 image then i converted into base64 string and sent to the frontend.我尝试从 Amazon S3 图像获取缓冲区,然后将其转换为 base64 字符串并发送到前端。 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?
它运行良好,它在页面中显示图像,但问题是处理 base64 的时间很长。如何制定比 base64 快得多的解决方法?
You can generate s3 signed URL link for each image and send the links to the front end.您可以为每个图像生成 s3 签名的 URL 链接并将链接发送到前端。 Now, the front end can make respective calls to fetch all images.
现在,前端可以进行相应的调用以获取所有图像。
This will reduce the time that backend does for the processing.这将减少后端处理的时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.