-
ChatterFeed
-
0Best Answers
-
2Likes Received
-
0Likes Given
-
1Questions
-
2Replies
Uploading aws object issue using javascript sdk in IE
Hi All,
I am trying to upload a file in to AWS using AWS Javascript SDK in Visual force Pages. Below is the java script code i have used to upload the file :
function uploadFile() {
document.getElementById('btnUpload').disabled=true;
ddocument.getElementById('btnUpload').disabled=true;
document.getElementById('dvMsg').style.visibility='visible';
AWS.config.update({ accessKeyId: 'XXXXXXXXXXXXXXXXX', secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXX' });
AWS.config.update({region : 'regionName'});
var aws_bucket = new AWS.S3({ params: { Bucket: 'bucketName' } });
var fileChooser = document.getElementById('file');
var file = fileChooser.files[0];
var aws_err = ''; var timeStamp = '';var aws_data = '';
if (file) {
var aws_params = { Key: file.name, ContentType: file.type, Body: file };
aws_bucket.putObject(aws_params, function (aws_err,aws_data) {
//results.innerHTML = err ? 'ERROR!' : 'UPLOADED.';
if(aws_err != null)
{
results.innerHTML = ' Some Error Occured while processing your request, please try after some time.. ';
document.getElementById('dvMsg').innerHTML="";
}
else
{
document.getElementById('dvMsg').style.visibility='hidden';
document.getElementById('dvMsg').innerHTML="UPLOADED";
}
});
} else {
results.innerHTML = 'Nothing to upload.';
}
}
The above code worked perfect until 18th April 2014. From 21st April 2014, the same code is throwing error in IE ( but working in Firefox and Chrome) and not working at all.
And the Error is "Object doesn't support property or method 'indexOf' "
Also an update was happened in the salesforce on 18th April 11 PM PST,
Is this update causing an issue??
Please any one help us regarding the issue.
I am trying to upload a file in to AWS using AWS Javascript SDK in Visual force Pages. Below is the java script code i have used to upload the file :
function uploadFile() {
document.getElementById('btnUpload').disabled=true;
ddocument.getElementById('btnUpload').disabled=true;
document.getElementById('dvMsg').style.visibility='visible';
AWS.config.update({ accessKeyId: 'XXXXXXXXXXXXXXXXX', secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXX' });
AWS.config.update({region : 'regionName'});
var aws_bucket = new AWS.S3({ params: { Bucket: 'bucketName' } });
var fileChooser = document.getElementById('file');
var file = fileChooser.files[0];
var aws_err = ''; var timeStamp = '';var aws_data = '';
if (file) {
var aws_params = { Key: file.name, ContentType: file.type, Body: file };
aws_bucket.putObject(aws_params, function (aws_err,aws_data) {
//results.innerHTML = err ? 'ERROR!' : 'UPLOADED.';
if(aws_err != null)
{
results.innerHTML = ' Some Error Occured while processing your request, please try after some time.. ';
document.getElementById('dvMsg').innerHTML="";
}
else
{
document.getElementById('dvMsg').style.visibility='hidden';
document.getElementById('dvMsg').innerHTML="UPLOADED";
}
});
} else {
results.innerHTML = 'Nothing to upload.';
}
}
The above code worked perfect until 18th April 2014. From 21st April 2014, the same code is throwing error in IE ( but working in Firefox and Chrome) and not working at all.
And the Error is "Object doesn't support property or method 'indexOf' "
Also an update was happened in the salesforce on 18th April 11 PM PST,
Is this update causing an issue??
Please any one help us regarding the issue.
-
- pavan kumar 14
- April 22, 2014
- Like
- 2
- Continue reading or reply
Uploading aws object issue using javascript sdk in IE
Hi All,
I am trying to upload a file in to AWS using AWS Javascript SDK in Visual force Pages. Below is the java script code i have used to upload the file :
function uploadFile() {
document.getElementById('btnUpload').disabled=true;
ddocument.getElementById('btnUpload').disabled=true;
document.getElementById('dvMsg').style.visibility='visible';
AWS.config.update({ accessKeyId: 'XXXXXXXXXXXXXXXXX', secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXX' });
AWS.config.update({region : 'regionName'});
var aws_bucket = new AWS.S3({ params: { Bucket: 'bucketName' } });
var fileChooser = document.getElementById('file');
var file = fileChooser.files[0];
var aws_err = ''; var timeStamp = '';var aws_data = '';
if (file) {
var aws_params = { Key: file.name, ContentType: file.type, Body: file };
aws_bucket.putObject(aws_params, function (aws_err,aws_data) {
//results.innerHTML = err ? 'ERROR!' : 'UPLOADED.';
if(aws_err != null)
{
results.innerHTML = ' Some Error Occured while processing your request, please try after some time.. ';
document.getElementById('dvMsg').innerHTML="";
}
else
{
document.getElementById('dvMsg').style.visibility='hidden';
document.getElementById('dvMsg').innerHTML="UPLOADED";
}
});
} else {
results.innerHTML = 'Nothing to upload.';
}
}
The above code worked perfect until 18th April 2014. From 21st April 2014, the same code is throwing error in IE ( but working in Firefox and Chrome) and not working at all.
And the Error is "Object doesn't support property or method 'indexOf' "
Also an update was happened in the salesforce on 18th April 11 PM PST,
Is this update causing an issue??
Please any one help us regarding the issue.
I am trying to upload a file in to AWS using AWS Javascript SDK in Visual force Pages. Below is the java script code i have used to upload the file :
function uploadFile() {
document.getElementById('btnUpload').disabled=true;
ddocument.getElementById('btnUpload').disabled=true;
document.getElementById('dvMsg').style.visibility='visible';
AWS.config.update({ accessKeyId: 'XXXXXXXXXXXXXXXXX', secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXX' });
AWS.config.update({region : 'regionName'});
var aws_bucket = new AWS.S3({ params: { Bucket: 'bucketName' } });
var fileChooser = document.getElementById('file');
var file = fileChooser.files[0];
var aws_err = ''; var timeStamp = '';var aws_data = '';
if (file) {
var aws_params = { Key: file.name, ContentType: file.type, Body: file };
aws_bucket.putObject(aws_params, function (aws_err,aws_data) {
//results.innerHTML = err ? 'ERROR!' : 'UPLOADED.';
if(aws_err != null)
{
results.innerHTML = ' Some Error Occured while processing your request, please try after some time.. ';
document.getElementById('dvMsg').innerHTML="";
}
else
{
document.getElementById('dvMsg').style.visibility='hidden';
document.getElementById('dvMsg').innerHTML="UPLOADED";
}
});
} else {
results.innerHTML = 'Nothing to upload.';
}
}
The above code worked perfect until 18th April 2014. From 21st April 2014, the same code is throwing error in IE ( but working in Firefox and Chrome) and not working at all.
And the Error is "Object doesn't support property or method 'indexOf' "
Also an update was happened in the salesforce on 18th April 11 PM PST,
Is this update causing an issue??
Please any one help us regarding the issue.
-
- pavan kumar 14
- April 22, 2014
- Like
- 2
- Continue reading or reply
Uploading aws object issue using javascript sdk in IE
Hi All,
I am trying to upload a file in to AWS using AWS Javascript SDK in Visual force Pages. Below is the java script code i have used to upload the file :
function uploadFile() {
document.getElementById('btnUpload').disabled=true;
ddocument.getElementById('btnUpload').disabled=true;
document.getElementById('dvMsg').style.visibility='visible';
AWS.config.update({ accessKeyId: 'XXXXXXXXXXXXXXXXX', secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXX' });
AWS.config.update({region : 'regionName'});
var aws_bucket = new AWS.S3({ params: { Bucket: 'bucketName' } });
var fileChooser = document.getElementById('file');
var file = fileChooser.files[0];
var aws_err = ''; var timeStamp = '';var aws_data = '';
if (file) {
var aws_params = { Key: file.name, ContentType: file.type, Body: file };
aws_bucket.putObject(aws_params, function (aws_err,aws_data) {
//results.innerHTML = err ? 'ERROR!' : 'UPLOADED.';
if(aws_err != null)
{
results.innerHTML = ' Some Error Occured while processing your request, please try after some time.. ';
document.getElementById('dvMsg').innerHTML="";
}
else
{
document.getElementById('dvMsg').style.visibility='hidden';
document.getElementById('dvMsg').innerHTML="UPLOADED";
}
});
} else {
results.innerHTML = 'Nothing to upload.';
}
}
The above code worked perfect until 18th April 2014. From 21st April 2014, the same code is throwing error in IE ( but working in Firefox and Chrome) and not working at all.
And the Error is "Object doesn't support property or method 'indexOf' "
Also an update was happened in the salesforce on 18th April 11 PM PST,
Is this update causing an issue??
Please any one help us regarding the issue.
I am trying to upload a file in to AWS using AWS Javascript SDK in Visual force Pages. Below is the java script code i have used to upload the file :
function uploadFile() {
document.getElementById('btnUpload').disabled=true;
ddocument.getElementById('btnUpload').disabled=true;
document.getElementById('dvMsg').style.visibility='visible';
AWS.config.update({ accessKeyId: 'XXXXXXXXXXXXXXXXX', secretAccessKey: 'XXXXXXXXXXXXXXXXXXXXXXX' });
AWS.config.update({region : 'regionName'});
var aws_bucket = new AWS.S3({ params: { Bucket: 'bucketName' } });
var fileChooser = document.getElementById('file');
var file = fileChooser.files[0];
var aws_err = ''; var timeStamp = '';var aws_data = '';
if (file) {
var aws_params = { Key: file.name, ContentType: file.type, Body: file };
aws_bucket.putObject(aws_params, function (aws_err,aws_data) {
//results.innerHTML = err ? 'ERROR!' : 'UPLOADED.';
if(aws_err != null)
{
results.innerHTML = ' Some Error Occured while processing your request, please try after some time.. ';
document.getElementById('dvMsg').innerHTML="";
}
else
{
document.getElementById('dvMsg').style.visibility='hidden';
document.getElementById('dvMsg').innerHTML="UPLOADED";
}
});
} else {
results.innerHTML = 'Nothing to upload.';
}
}
The above code worked perfect until 18th April 2014. From 21st April 2014, the same code is throwing error in IE ( but working in Firefox and Chrome) and not working at all.
And the Error is "Object doesn't support property or method 'indexOf' "
Also an update was happened in the salesforce on 18th April 11 PM PST,
Is this update causing an issue??
Please any one help us regarding the issue.
- pavan kumar 14
- April 22, 2014
- Like
- 2
- Continue reading or reply