[英]Resume File Upload from User's machine to Azure Blob Storage and Download file from Azure Blob to User's machine in Typescript(angular) from Browser
I am very new to Angular.我对 Angular 很陌生。 Can anyone please help me how can I RESUME file upload from User's machine to Azure Blob Storage and download file from Azure Blob to user's machine in Typescript(angular) from Browser.
任何人都可以帮助我如何从用户的机器恢复文件上传到 Azure Blob 存储,并从浏览器中以 Typescript(angular)将文件从 Azure Blob 下载到用户的机器。 I am using @azure/storage-blob npm library to upload/download files to Azure Blob.
我正在使用 @azure/storage-blob npm 库将文件上传/下载到 Azure Blob。
SAS tokens have a limited validity: It starts at a certain point in time (which can also be in the future) and ends eventually. SAS 令牌的有效性有限:它在某个时间点(也可能是在未来)开始并最终结束。 For the SAS token expiry keep tracking the expiry time and renew the SAS token.
对于 SAS 令牌到期,请跟踪到期时间并更新 SAS 令牌。 Since for security reason you can't increase expiry time but in case if it's expired then renew.
由于出于安全原因,您不能增加到期时间,但如果它已到期,请续订。
SAS token basically need to be continuously refreshed on certain interval in order to make sure no connection breach. SAS 令牌基本上需要在一定的时间间隔内不断刷新,以确保没有连接中断。
So, you can't resume the upload file after the SAS token expired you need to create another SAS token and it will start upload file from zero.因此,您无法在 SAS 令牌过期后恢复上传文件,您需要创建另一个 SAS 令牌,它将从零开始上传文件。 But there is another way you can use to resume the upload file using azcopy using the same job id and new SAS token
但是还有另一种方法可以使用 azcopy 使用相同的作业 ID 和新的 SAS 令牌恢复上传文件
Reference : Azcopy: Is it possible do resume a download with a new SAS key参考: Azcopy:是否可以使用新的 SAS 密钥恢复下载
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.