diff options
| -rw-r--r-- | Gruntfile.js | 1 | ||||
| -rw-r--r-- | js/pomf.js | 4 | ||||
| -rw-r--r-- | pages/index.swig | 2 | ||||
| -rw-r--r-- | pages/upload_form.swig | 2 | ||||
| -rw-r--r-- | static/upload.php | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index 10e2b2b..7581083 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,6 +9,7 @@ module.exports = function (grunt) { autoescape: true }, banners: grunt.file.readJSON('pages/banners.json'), + max_upload_size: 50, dest: "dist/", cwd: "pages/", generateSitemap: false, @@ -124,9 +124,9 @@ $(function () { eachRow(res.files, function (row, file, files) { var link = $('<a>') - link.attr('href', 'http://a.pomf.se/' + file.url) + link.attr('href', file.url) .attr('target', '_BLANK') - .text('a.pomf.se/' + file.url) + .text(file.url.replace("http://","").replace("https://","")) $('.file-url', row).append(link) }) diff --git a/pages/index.swig b/pages/index.swig index d69bc02..9215859 100644 --- a/pages/index.swig +++ b/pages/index.swig @@ -3,7 +3,7 @@ {% block body %} <div class="jumbotron"> <h1>Ohayou!</h1> - <p class="lead">Max upload size is 50MiB, read the <a href="faq.html">FAQ</a></p> + <p class="lead">Max upload size is {{max_upload_size}}MiB, read the <a href="faq.html">FAQ</a></p> {% include "check_script.swig" %} {% include "check_fileapi.swig" %} {% include "upload_form.swig" %} diff --git a/pages/upload_form.swig b/pages/upload_form.swig index 7430f28..c5a00ce 100644 --- a/pages/upload_form.swig +++ b/pages/upload_form.swig @@ -1,3 +1,3 @@ <a href="javascript:;" id="upload-btn" class="btn">Select <span>or drop </span>file(s)</a> -<input type="file" id="upload-input" name="files[]" multiple data-max-size="50MiB"> +<input type="file" id="upload-input" name="files[]" multiple data-max-size="{{max_upload_size}}MiB"> <ul id="upload-filelist"></ul> diff --git a/static/upload.php b/static/upload.php index 7756e03..4a209f3 100644 --- a/static/upload.php +++ b/static/upload.php @@ -125,7 +125,7 @@ function upload_file ($file) { return array( 'hash' => $file->get_sha1(), 'name' => $file->name, - 'url' => $newname, + 'url' => POMF_URL . $newname, 'size' => $file->size ); } else { |
