简体   繁体   English

使用 Node.js Vue.js 在前端显示来自 Amazon S3 私有存储桶的图像

[英]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.

相关问题 用于将文件从 s3 复制到 s3 存储桶的节点 js 代码 - node js code for copying file from s3 to s3 bucket 如何使用 cURL 从 Amazon S3 存储桶中删除文件 - How to delete a file from amazon S3 bucket using cURL 如何使用 node.js 向 amazon s3 请求下载文件? - How to make request to amazon s3 using node js for downloading a file? 使用预签名 URL 将文件从 javascript 前端上传到 S3 存储桶返回错误 400 - Uploading a file from javascript frontend to S3 bucket using presigned URL return error 400 无法读取使用 Node.js 上传到 S3 存储桶的 css 文件 - Unable to read css file uploaded to S3 bucket with Node.js 亚马逊 s3 将桶与桶策略 - Amazon s3 put bucket with bucket policy 从私有 S3 存储桶读取文件到 pandas dataframe - Reading a file from a private S3 bucket to a pandas dataframe 使用 Java (Amazon S3) 将 all.txt 文件从一个 object 复制到另一个但在同一个存储桶中 - Copy all .txt files from one object to another but in the same bucket using Java (Amazon S3) 如何使用 python 将对象从 amazon glacier 永久恢复到 s3 存储桶中的标准层? - How to restore objects from amazon glacier to standard tier permanently in a s3 bucket using python? 如何从 amazon s3 存储桶中删除文件? - how to delete files from amazon s3 bucket?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM