Skip to content
Permalink
Browse files

Can't start when log file size <10K

Small bug fix.
  • Loading branch information...
hazarkarabay committed Jul 27, 2014
1 parent f554da4 commit 3aa56b616fc9defb4f94d8e19f6e9d5211aeddaf
Showing with 37 additions and 19 deletions.
  1. +22 −0 .gitattributes
  2. +1 −0 .gitignore
  3. +14 −19 index.html
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
@@ -0,0 +1 @@
/nbproject/
@@ -97,6 +97,10 @@
};
var blob = file.slice(position, position + 1000);
reader.readAsBinaryString(blob);
} else {
intv = window.setInterval(function() {
read(position)
}, 500);
}
});
});
@@ -171,26 +175,17 @@
})
}
// http://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0)
return '0 Bytes';
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];
}
</script>
</head>
<body>
<div class="file_container">
<p>Select your hmail log file. </p>
<input type="file" id="logfile" name="file" />
<p>If you select any other file it will probably crash your browser so please don't do that.</p>
</div>
<hr>
<div class="log_container">
Your logs will show here.
</div>
</body>
<div class="file_container">
<p>Select your hmail log file. </p>
<input type="file" id="logfile" name="file" />
<p>If you select any other file it will probably crash your browser so please don't do that.</p>
</div>
<hr>
<div class="log_container">
Your logs will show here.
</div>
</body>
</html>

0 comments on commit 3aa56b6

Please sign in to comment.
You can’t perform that action at this time.