summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gruntfile.js1
-rw-r--r--README.md6
-rw-r--r--js/pomf.js4
-rw-r--r--pages/index.swig2
-rw-r--r--pages/upload_form.swig2
-rw-r--r--static/upload.php2
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,
diff --git a/README.md b/README.md
index 1b5a906..de0aef5 100644
--- a/README.md
+++ b/README.md
@@ -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/).
diff --git a/js/pomf.js b/js/pomf.js
index 52d03ee..f5dd06b 100644
--- a/js/pomf.js
+++ b/js/pomf.js
@@ -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 {