Commit ec16869f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

upload of data overlay didn't work

parent d3857686
......@@ -1727,6 +1727,13 @@ ServerConnector.addComment = function (params) {
});
};
/**
*
* @param {DataOverlay} params.overlay
* @param {string|number} params.fileId
* @param {string} [params.projectId]
* @returns {PromiseLike<DataOverlay>}
*/
ServerConnector.addOverlay = function (params) {
var overlay = params.overlay;
if (!(overlay instanceof DataOverlay)) {
......@@ -1739,6 +1746,7 @@ ServerConnector.addOverlay = function (params) {
description: overlay.getDescription(),
content: overlay.getContent(),
filename: overlay.getFilename(),
googleLicenseConsent: overlay.isGoogleLicenseConsent(),
fileId: params.fileId
};
return self.getProjectId(params.projectId).then(function (result) {
......@@ -1788,7 +1796,7 @@ ServerConnector.updateOverlay = function (overlay) {
creator: overlay.getCreator(),
publicOverlay: overlay.getPublicOverlay(),
defaultOverlay: overlay.isDefaultOverlay(),
googleLicenseConsent : overlay.isGoogleLicenseConsent()
googleLicenseConsent: overlay.isGoogleLicenseConsent()
}
};
return self.sendPatchRequest(self.updateOverlayUrl(queryParams), filterParams);
......
......@@ -165,8 +165,10 @@ AddOverlayDialog.prototype.addOverlay = function () {
var overlay = new DataOverlay({
name: nameInput.value,
description: descriptionInput.value,
filename: filename
filename: filename,
googleLicenseConsent: consent
});
if (filename === undefined || filename === "") {
filename = "unknown.txt";
}
......@@ -178,8 +180,7 @@ AddOverlayDialog.prototype.addOverlay = function () {
return ServerConnector.addOverlay({
fileId: file.id,
overlay: overlay,
projectId: self.getProject().getProjectId(),
googleLicenseConsent: consent
projectId: self.getProject().getProjectId()
});
}).then(function (result) {
overlay = result;
......
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