如何使用 angular ng2-file-upload 在 s3 存储桶中上传图像?

How to upload images in s3 bucket using angular ng2-file-upload?

此处需要更改哪些代码才能在 s3 存储桶上上传图片。

uploader: FileUploader = new FileUploader({
    url: URL,
    disableMultipart: true,
    formatDataFunctionIsAsync: true,
    formatDataFunction: async (item) => {
      return new Promise((resolve, reject) => {
        resolve({
          name: item._file.name,
          length: item._file.size,
          contentType: item._file.type,
          date: new Date()
        });
      });
    }
  });

提前致谢。

这个方法我已经实现了

ngAfterViewInit() {
  // upload image on aws 
   this.uploader.onAfterAddingFile = (item => {
        // Here S3 image upload code.  
    });
})