Skip to content

Commit

Permalink
check it webkitRelativePath exists
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jul 15, 2019
1 parent ab215af commit e98f05e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ var filesize = 0;
// console.log(file);
var domain = document.getElementById("inputDomain").value
files.push(file);
if (files.length == 1) {
relativeDirectory = file.webkitRelativePath.split("/")[0];
} else if (file.webkitRelativePath.split("/")[0] != relativeDirectory) {
relativeDirectory = "";
if (file.hasOwnProperty("webkitRelativePath")) {
if (files.length == 1) {
relativeDirectory = file.webkitRelativePath.split("/")[0];
} else if (file.webkitRelativePath.split("/")[0] != relativeDirectory) {
relativeDirectory = "";
}
}


if (!(isConnected)) {
isConnected = true;
socketSend({
Expand Down

0 comments on commit e98f05e

Please sign in to comment.