Поместите изображение в корзину s3, используя подписанный URL

Я пытался использовать подписанный URL из s3 и отправлять base64encoded image Но в моем контейнере s3 я вижу только файл с именем mykey. SignedUrl вернулся успешно. Любое предложение о том, что я делаю не так?

  const file = this.fileInput.nativeElement.files[0];
  if (file) {

  const reader = new FileReader();
  reader.readAsDataURL(this.fileInput.nativeElement.files[0]);
  reader.onload = () => {
    this.fileDataUri = reader.result;
  }
} 

// get only the base64 file
if (this.fileDataUri.length > 0) {
      const base64File = this.fileDataUri.split(',')[1];
      this.store.dispatch(new fromPropertyAction.GetUserSession(base64File));
      console.log(base64File);
   }

}

В своем действии я отправляю этот вызов API:

const data = {'image': base64File};
this.httpClient.put(signedUrl, data)

0 ответов

Другие вопросы по тегам