diff options
| author | kanadeko <[email protected]> | 2017-01-14 18:13:58 -0300 |
|---|---|---|
| committer | kanadeko <[email protected]> | 2017-01-14 18:13:58 -0300 |
| commit | b81cf72ac41f61e48a86d699e12fcfc327cefb14 (patch) | |
| tree | c64cdd3d6df48a1969148f7b0fca2cbd60568ded /public | |
| parent | Update config.sample.js (diff) | |
| download | host.fuwn.me-b81cf72ac41f61e48a86d699e12fcfc327cefb14.tar.xz host.fuwn.me-b81cf72ac41f61e48a86d699e12fcfc327cefb14.zip | |
Changed from ip whitelist to token based auth
Diffstat (limited to 'public')
| -rw-r--r-- | public/js/upload.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/public/js/upload.js b/public/js/upload.js index 4795679..0696af6 100644 --- a/public/js/upload.js +++ b/public/js/upload.js @@ -1,5 +1,4 @@ var maxSize = '512'; -var urlPrefix = ''; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { @@ -10,8 +9,6 @@ xhr.onreadystatechange = function() { } if(xhr.responseText.maxFileSize) maxSize = xhr.responseText.maxFileSize; - if(xhr.responseText.urlPrefix) - urlPrefix = xhr.responseText.urlPrefix + '/'; } } xhr.open('GET', '/api/info', true); @@ -45,7 +42,7 @@ window.onload = function () { dropzone.on("success", function(file, response) { // Handle the responseText here. For example, add the text to the preview element: a = document.createElement('a'); - a.href = window.location.origin + '/' + urlPrefix + response.filename; + a.href = response.url; a.target = '_blank'; a.innerHTML = response.filename; |