简体   繁体   English

将'Azure Blob存储'文件URL流式传输到Amazon S3存储桶

[英]Stream 'Azure Blob Storage' file URL to Amazon S3 bucket

I am consuming a document-sharing API in my application, which when used, returns a "downloadUrl" for a given file located in Azure Blob Storage. 我在应用程序中使用了文档共享API,使用该API时,将为Azure Blob存储中的给定文件返回“ downloadUrl”。

I want to take that Azure Blob Storage url, and stream the document into an Amazon S3 bucket. 我想获取该Azure Blob存储URL,并将文档流式传输到Amazon S3存储桶。

How would I go about doing this? 我将如何去做呢? I see similar questions such as Copy from Azure Blob to AWS S3 using C# , but in that example they seem to have access to the stream of the document itself. 我看到类似的问题,例如使用C#从Azure Blob复制到AWS S3 ,但在该示例中,它们似乎可以访问文档本身的流。 Is there any way for me to simply provide S3 with the link, and have them do the rest? 我有什么办法可以简单地向S3提供链接,让他们完成其余的工作吗? Or do I need to get the file on the server, and stream it as in the example above? 还是我需要在服务器上获取文件,然后像上面的示例一样将其流化?

Thanks in advance for the help. 先谢谢您的帮助。

There is only one case where S3 can be directed to fetch content "into" an object, and that is when the source is also an existing S3 object. 仅在一种情况下,可以指导S3将内容“提取”到一个对象中,也就是说,当源也是现有的S3对象时。 It can be in the same bucket or a different bucket, or even a different AWS region or account, as long as the calling user has permissions on both source and target. 只要调用用户对源和目标都具有权限,它就可以在同一存储桶中,也可以在不同的存储桶中,甚至可以在不同的AWS区域或账户中。

Any other case -- such as what you are contemplating -- requires that you fetch the object from the source, yourself, and then upload it into S3... as in the example. 在任何其他情况下(例如您正在考虑的情况),都需要您自己从源中获取对象,然后将其上载到S3中,如示例中所示。

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

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