This commit is contained in:
Daniela Arcese 2017-06-05 10:26:50 -04:00
parent 532f3c31a4
commit dce581466d
2 changed files with 10 additions and 10 deletions

View file

@ -3,17 +3,17 @@ const FileSender = require('./fileSender');
let onChange = event => { let onChange = event => {
const file = event.target.files[0]; const file = event.target.files[0];
let fileList = document.getElementById("uploaded-files"); let fileList = document.getElementById('uploaded-files');
let row = document.createElement("tr"); let row = document.createElement('tr');
let name = document.createElement("td"); let name = document.createElement('td');
let link = document.createElement("td"); let link = document.createElement('td');
let expiry = document.createElement("td"); let expiry = document.createElement('td');
let cellText = document.createTextNode(file.name); let cellText = document.createTextNode(file.name);
name.appendChild(cellText); name.appendChild(cellText);
let progress = document.createElement("p"); let progress = document.createElement('p');
row.appendChild(name); row.appendChild(name);
row.appendChild(link); row.appendChild(link);
@ -29,9 +29,9 @@ let onChange = event => {
.origin}/download/${info.fileId}/#${info.secretKey}`; .origin}/download/${info.fileId}/#${info.secretKey}`;
link.innerHTML = url; link.innerHTML = url;
localStorage.setItem(info.fileId, info.deleteToken); localStorage.setItem(info.fileId, info.deleteToken);
let del = document.createElement("td"); let del = document.createElement('td');
let btn = document.createElement("button"); let btn = document.createElement('button');
btn.innerHTML = "x"; btn.innerHTML = 'x';
btn.classList.add('delete-btn'); btn.classList.add('delete-btn');
btn.addEventListener('click', () => { btn.addEventListener('click', () => {
FileSender.delete( FileSender.delete(

View file

@ -16,7 +16,7 @@
<div class="upload-window"> <div class="upload-window">
<div id="upload-img"><img src='resources/upload.svg'/></div> <div id="upload-img"><img src='resources/upload.svg'/></div>
<div> <div>
DRAG & DROP DRAG &amp; DROP
</div> </div>
<div class="upload"> <div class="upload">
<div id="browse-text"> <div id="browse-text">