简体   繁体   English

Angular 5从Dropbox下载文件并将其上传到AWS s3

[英]Angular 5 Download file from dropbox and Upload it to AWS s3

I am currently using dropbox file picker to download the file. 我目前正在使用保管箱文件选择器下载文件。 I got the download link after selection of file using dropbox picker. 使用Dropbox Picker选择文件后,我得到了下载链接。

Is there any possibility that we can save it inside bytestream in browser and upload it to server(Node.JS) using http post call ? 是否有可能将其保存在浏览器的字节流中,并使用http post调用将其上传到服务器(Node.JS)?

Or Is there any alternative to this scenario ? 还是该方案有其他选择?

Any help would be appreciated. 任何帮助,将不胜感激。

Instead of downloading and reuploading the file on the browser, I would have this step to be processed on the server side. 与其在浏览器上下载并重新上传文件,不如在服务器端处理此步骤。

You can use Dropbox and S3 sdk's and follow the steps below: 您可以使用DropboxS3 SDK,并按照以下步骤操作:

  1. Make a call to the server that will send IDs of the list of files available in Dropbox. 呼叫服务器,该服务器将发送Dropbox中可用文件列表的ID。
  2. Let the user select a file in the angular app and send the selected file's resource identifier back to the server. 让用户在angular应用程序中选择一个文件,然后将所选文件的资源标识符发送回服务器。
  3. Download the file and then re-upload it to the S3 on the server side. 下载文件,然后将其重新上传到服务器端的S3。
  4. Display the result/status back to the user. 向用户显示结果/状态。

Is there any reason you want this to be done in the frontend? 您是否有任何理由希望在前端完成此操作?

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

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