var file = $("#uploadDsData").get(0).files[0];
var formData = new FormData();
formData.append('uploadDsData', file);
$.ajax({
url: "https://local.cipher.kiev.ua:9091/api/v1/ticket/79343564-147f-4a2a-ac2a-182d7a55f802/ds/data",
type: "POST",
contentType: false,
processData: false,
data: formData
}).done(function (jsonResponse, textStatus, xhr) {
message = jsonResponse.message;
}).fail(function (xhr) {
try {
var jsonResponse = JSON.parse(xhr.responseText);
message = jsonResponse.message;
failureCause = jsonResponse.failureCause;
} catch (e) {
message = (xhr.responseText == undefined) ? "Помилка при завантаженні даних ЕП." : xhr.responseText;
}
}) |