Created
March 19, 2021 09:56
-
-
Save thanakijwanavit/7dc80179c01363d5115cbd65e364d759 to your computer and use it in GitHub Desktop.
update to s3 using signedurl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func uploadfileAWSS3(fileuploadurl, contenttype, file): Observable<any>{ | |
//this will be used to upload all csv files to AWS S3 | |
const headers = new HttpHeaders({‘Content-Type’: contenttype}); | |
const req = new HttpRequest( | |
‘PUT’, | |
fileuploadurl, | |
file, | |
{ | |
headers: headers, | |
reportProgress: true, //This is required for track upload process | |
}); | |
return this.http.request(req); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment