diff options
| -rw-r--r-- | Gruntfile.js | 1 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -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 |
6 files changed, 7 insertions, 10 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, @@ -1,4 +1,4 @@ -# Pomf.se +# Pomf Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to work with Apache 2.4 and newer PHP versions. Should work with any other PDO-compatible database. @@ -6,10 +6,6 @@ and newer PHP versions. Should work with any other PDO-compatible database. For the purposes of this guide, we won't cover setting up Nginx, PHP, MySQL, Node, or NPM. So we'll just assume you already have them all running well. -[Nginx Config](https://pomf.se/transparency/configs/nginx) - -[PHP Config](https://pomf.se/transparency/configs/php/) - ## Compiling The assets are minified and combined using [Grunt](http://gruntjs.com/). @@ -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 { |
