naming improvements, stopped storing files by name on server
This commit is contained in:
parent
1800f87065
commit
2d2f2efe91
5 changed files with 12 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Page Title</title>
|
||||
<title>Download your file</title>
|
||||
<script type="text/javascript" src="/file.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -44,11 +44,13 @@ function download() {
|
|||
var downloadUrl = URL.createObjectURL(blob);
|
||||
var a = document.createElement("a");
|
||||
a.href = downloadUrl;
|
||||
a.download = xhr.getResponseHeader('Content-Disposition').match(/filename="(.+)"/)[1];;
|
||||
a.download = xhr.getResponseHeader('Content-Disposition').match(/filename="(.+)"/)[1];
|
||||
console.log(xhr.getResponseHeader('Content-Disposition'));
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
})
|
||||
.catch(function(err){
|
||||
alert('This link is either invalid or has expired.');
|
||||
console.error(err);
|
||||
});
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Page Title</title>
|
||||
<title>Firefox Fileshare</title>
|
||||
<script src="file.js"></script>
|
||||
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue