Here which code should need to change for upload images on s3 bucket.
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()
});
});
}
});
Thanks in advance.
I have implemented in this method.
ngAfterViewInit() {
// upload image on aws
this.uploader.onAfterAddingFile = (item => {
// Here S3 image upload code.
});
})