Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple fix for error in IE when parsing AWS response #486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/vue2Dropzone.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue2Dropzone.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/vue-dropzone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default {
response,
"text/xml"
);
var s3ObjectLocation = xmlResponse.firstChild.children[0].innerHTML;
var s3ObjectLocation = xmlResponse.firstChild.firstChild.firstChild.textContent;
vm.$emit("vdropzone-s3-upload-success", s3ObjectLocation);
}
if (vm.wasQueueAutoProcess) vm.setOption("autoProcessQueue", false);
Expand Down
6 changes: 3 additions & 3 deletions src/services/urlsigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ export default {
request.onload = function () {
if (request.status == 201) {
var s3Error = (new window.DOMParser()).parseFromString(request.response, "text/xml");
var successMsg = s3Error.firstChild.children[0].innerHTML;
var successMsg = s3Error.firstChild.firstChild.firstChild.textContent;
resolve({
'success': true,
'message': successMsg
})
} else {
var s3Error = (new window.DOMParser()).parseFromString(request.response, "text/xml");
var errMsg = s3Error.firstChild.children[0].innerHTML;
var errMsg = s3Error.firstChild.firstChild.firstChild.textContent;
reject({
'success': false,
'message': errMsg + ". Request is marked as resolved when returns as status 201"
Expand All @@ -76,7 +76,7 @@ export default {
};
request.onerror = function (err) {
var s3Error = (new window.DOMParser()).parseFromString(request.response, "text/xml");
var errMsg = s3Error.firstChild.children[1].innerHTML;
var errMsg = s3Error.firstChild.firstChild.firstChild.textContent;
reject({
'success': false,
'message': errMsg
Expand Down