2018-04-28 13:00:30 +00:00
|
|
|
<%
|
|
|
|
function humanFileSize(bytes, si)
|
|
|
|
{
|
|
|
|
var thresh = si ? 1000 : 1024;
|
|
|
|
if(Math.abs(bytes) < thresh)
|
|
|
|
{
|
|
|
|
return bytes + ' B';
|
|
|
|
}
|
|
|
|
|
|
|
|
var units = si
|
|
|
|
? ['kB','MB','GB','TB','PB','EB','ZB','YB']
|
|
|
|
: ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];
|
|
|
|
var u = -1;
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
|
|
|
bytes /= thresh;
|
|
|
|
++u;
|
|
|
|
}
|
|
|
|
while(Math.abs(bytes) >= thresh && u < units.length - 1);
|
|
|
|
|
|
|
|
return bytes.toFixed(1) + ' ' + units[u];
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
<p>Hello <%= user.name %>,</p>
|
|
|
|
<p>The following files have just been uploaded:</p>
|
|
|
|
<ul>
|
|
|
|
<% upload.files.forEach((file) => { %>
|
|
|
|
<li><%= file.name %> (<%= humanFileSize(file.size, true) %>)</li>
|
|
|
|
<% }) %>
|
|
|
|
</ul>
|
2018-05-02 21:01:29 +00:00
|
|
|
<% if (upload.expirationDate !== null) { %>
|
|
|
|
These files will be automatically deleted after <%=upload.expirationDate.toLocaleString('en-US')%>
|
|
|
|
<% } %>
|
2018-04-28 13:00:30 +00:00
|
|
|
<p>You can download these files by logging in to <a href="<%= adminUrl %>"><%= adminUrl %></a></p>
|
|
|
|
<p>Cheers,<br />Recv</p>
|