Answer the question
In order to leave comments, you need to log in
How to download file from S3 Bucket to end user using javascript?
By and large, the task is not trivial.
There is a button with an attached event. When you click on the button, you need to download the file from the S3 Bucket. Actually the file is downloaded using this code:
bucket.getObject(
{ Bucket: "x_name", Key: s.path + md5(s.user_id.toString()) + '-' + s.user_id + '.' + s.extension },
function (error, data) {
if (error == null) {
window.alert("Loaded " + data.ContentLength + " bytes");
// do something with data.Body
}
}
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question