Skip to content

Commit

Permalink
tweak js upload code to display acurate time
Browse files Browse the repository at this point in the history
  • Loading branch information
samehvirus committed Jun 3, 2019
1 parent 2e54660 commit a796121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ document.addEventListener('DOMContentLoaded', () => {
let name = selectedFile.name
FReader = new FileReader();
FReader.onload = function (evnt) {
socket.emit('upload', { 'name': name, 'data': evnt.target.result, 'size': selectedFile.size, 'type': selectedFile.type });
socket.emit('upload', { 'name': name, 'data': evnt.target.result, 'size': selectedFile.size, 'type': selectedFile.type, 'timestamp': GetCurrentTimestamp() });
}
FReader.readAsArrayBuffer(selectedFile);
$uploadInput.value=''
Expand Down

0 comments on commit a796121

Please sign in to comment.