Forbids binding or assignment of the names eval and arguments in any form

Strict mode does not alias properties of the arguments object with the formal parameters. (i.e. in function sum (a,b) { return arguments[0] + b;} This works because arguments[0]is bound to a and so on. )

You can fetch pre-signed URL from server side either directly while landing on the page or via AJAX. Preferred method is do a AJAX to server side with the param (filename) and in the server generate a pre-signed url using file name and time-stamp.

JAVASCRIPT (Trigger a PUT call to AWS S3 using pre-signed url)

$.ajax( {
url: url, //presinged-url which you get from server side
type: 'PUT',
data: file,
processData: false,
contentType: false,
headers: {'Content-Type': 'multipart/form-data'},
success: function(){
console.log('Image successfully uploaded. Now the object (image/pdf/text/whatever-it-is now can be downloaded using public url received from server side');
}
error: function(){
console.log('Something went wrong');
}
});

ADD CORS ON AWS S3 (do this only for a particular bucket, avoid doing it globally)