Skip to content

Commit

Permalink
upload file
Browse files Browse the repository at this point in the history
  • Loading branch information
strukturart committed Jan 15, 2024
1 parent f3e96b1 commit 491a896
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions application/assets/js/osm.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ const osm = (() => {
xhr.setRequestHeader("Authorization", n);

xhr.onload = function () {
helper.side_toaster("file uploaded", 5000);

if (xhr.status === 200) {
const data = xhr.responseText;
helper.side_toaster("file updated", 2000);
} else {
const error = "Error: " + xhr.status;
helper.side_toaster(error, 4000);
Expand Down Expand Up @@ -273,7 +274,7 @@ const osm = (() => {
};

files.push({
name: "_" + m.name,
name: "+ " + m.name,
path: m.id,
id: m.id,
type: "osm_sever",
Expand All @@ -292,7 +293,7 @@ const osm = (() => {
};

files.push({
name: m.name,
name: "+ " + m.name,
path: m.id,
id: m.id,
type: "osm_sever",
Expand Down
2 changes: 0 additions & 2 deletions application/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,6 @@ document.addEventListener("DOMContentLoaded", function () {
general.last_map_type
);

console.log(general);

//get files and store

// Function to remove duplicates based on the 'name' property
Expand Down

0 comments on commit 491a896

Please sign in to comment.