Commit ac5f6bea authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

[Bug 30538] Сообщение с неизвестной ошибкой при вставке изображения с жесткого диска(Edge)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65230 954022d7-b5bf-4e40-9824-e11837661b57
parent 2c7d0c00
......@@ -718,8 +718,10 @@ function InitDragAndDrop (oHtmlElement, callback) {
}
function UploadImageFiles (files, documentId, documentUserId, callback) {
if (files.length > 0) {
var file = files[0];
var xhr = new XMLHttpRequest();
xhr.open('POST', g_sUploadServiceLocalUrl + '/' + documentId + '/' + documentUserId + '/' + g_oDocumentUrls.getMaxIndex());
xhr.open('POST', g_sUploadServiceLocalUrl + '/' + documentId + '/' + documentUserId + '/' + g_oDocumentUrls.getMaxIndex(), true);
xhr.setRequestHeader('Content-Type', file.type || 'application/octet-stream');
xhr.onreadystatechange = function() {
if (4 == this.readyState) {
if((this.status == 200 || this.status == 1223)) {
......@@ -737,7 +739,7 @@ function UploadImageFiles (files, documentId, documentUserId, callback) {
callback(c_oAscError.ID.Unknown);
}
};
xhr.send(files[0]);
xhr.send(file);
} else {
callback(c_oAscError.ID.Unknown);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment