简体   繁体   English

恢复从用户机器到 Azure Blob 存储的文件上传,并从浏览器以 Typescript(angular)将文件从 Azure Blob 下载到用户机器

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

相关问题 将文件从客户端上传到Azure Blob存储| MVC - Upload File/s From Client To Azure Blob Storage | MVC 从 Angular 向 Azure 存储 Blob 添加文件 - Adding File to Azure Storage Blob from Angular 上载然后下载带有Windows Azure,Blob存储和Node.js的大文件 - Upload and then download a big file, with windows azure, blob storage and nodejs 如何使用javascript从stringstream内容azure blob存储下载png文件 - How to download png file from stringstream content azure blob storage using javascript 如何从 azure blob 存储中获取图像作为文件? - How to get the image from azure blob storage as file? 在新选项卡中显示 Azure Blob 存储容器中的 PDF 文件 - Displaying PDF file from Azure Blob Storage container in new tab 我是流的新手,我需要从 ftp 下载文件并作为 stream 发送到 azure stageblock(npm @azure/storage-blob) - I am new to streams and i have requirement to download file from ftp and send as a stream to azure stageblock(npm @azure/storage-blob) 用于从 Azure blob 存储下载文件的 javascript 代码 - javascript code to download files from Azure blob storage 从客户端Javascript上传Azure存储块Blob - Azure Storage Block Blob upload from client side Javascript 使用Intel XDK将图像从PhoneGap上传到Azure Blob存储 - Upload image from PhoneGap to Azure Blob Storage using Intel XDK
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM