简体   繁体   English

直接从 wordpress 中的 s3 存储桶(在与 s3 兼容的云中,而不是 amazo 中)提供大文件

[英]Serve huge files directy from s3 bucket (in a s3 compatible cloud, not amazo) in wordpress

I have a huge file stored in a s3 compatible cloud ocean (not Amazon).我有一个巨大的文件存储在与 s3 兼容的云海洋(不是亚马逊)中。 I want to have a download button which will result to downloading this file for user.我想要一个下载按钮,它将导致为用户下载此文件。

I have installed "Media Cloud" plugin which has ability to connect to s3 compatible cloud.我已经安装了能够连接到 s3 兼容云的“媒体云”插件。 But I cant find a way to serve this file which is only saved in my s3 bucket in my wordpress.但是我找不到提供这个文件的方法,它只保存在我的 wordpress 的 s3 存储桶中。

If you only have 1 file to serve, you should be able to get the URL of the file in your s3 bucket admin panel where the file lives.如果您只有 1 个文件要提供,您应该能够在文件所在的 s3 存储桶管理面板中获取该文件的 URL。

The main thing you need to check if the object (the file) is publically readable and your bucket is set up as a "static website" so it can serve HTTP.您需要检查 object(文件)是否可公开读取,并且您的存储桶是否设置为“静态网站”,以便它可以为 HTTP 提供服务。 If it's not, you won't be given an object URL to put on your site.如果不是,您将不会获得 object URL 放在您的网站上。

I'm not sure who you host your s3 with if you say it's not Amazon, but here's a guide on how to do it if you did use Amazon .如果您说它不是 Amazon,我不确定您与谁托管您的 s3,但是如果您确实使用了 Amazon,这里有一个指南,说明如何做到这一点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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