")
+ console.log(o)
+ }
+ });
- document.onpaste = function(event){
+ document.onpaste = function (event) {
var items = (event.clipboardData || event.originalEvent.clipboardData).items;
for (index in items) {
- var item = items[index];
- if (item.kind === 'file') {
- // adds the file to your dropzone instance
- myDropzone.addFile(item.getAsFile())
- }
+ var item = items[index];
+ if (item.kind === 'file') {
+ // adds the file to your dropzone instance
+ myDropzone.addFile(item.getAsFile())
+ }
}
- }
- })
\ No newline at end of file
+ }
+})
\ No newline at end of file
diff --git a/rtfm/CONFIG.md b/rtfm/CONFIG.md
index 251eed5..ec36f66 100644
--- a/rtfm/CONFIG.md
+++ b/rtfm/CONFIG.md
@@ -19,8 +19,8 @@ In this file you can set the following options. For a simple working example con
| UPLOAD_FORM_LOCATION | string | If set, will only show the upload form if this url is requested. eg if you set it to /secret/upload then you only see the form if you go to http://your.pictshare.server/secret/upload but bare in mind that the uploads [via API](/rtfm/API.md) will still work for anyone|
| ALLOWED_SUBNET | IPv4 or IPv6 CIDR | If set, will limit uploads to IPs that match this CIDR |
| ALWAYS_WEBP | bool | If set to `true`, JPGs will always be served as WebP, if the client supports it (if `image/webp` is in header `HTTP_ACCEPT`) |
+| UPLOAD_CODE | string | If set, all uploads require this code via GET or POST variable "uploadcode" to succeed |
| UPLOAD_QUOTA (NOT IMPLEMENTED) | int | Size in MB. If set, will only allow uploads if combined size of uploads on Server is smaller than this value. Does not account for ALT_FOLDER data and resized versions of original uploads won't be added to calculation |
-| UPLOAD_CODE (NOT IMPLEMENTED | string | If set, all uploads require this code via GET or POST variable "uploadcode" or upload will fail |
| MAX_RESIZED_IMAGES (NOT IMPLEMENTED | string | If set, limits count of resized images/videos per file on server |
diff --git a/rtfm/DOCKER.md b/rtfm/DOCKER.md
index 03f4f88..95d63e4 100644
--- a/rtfm/DOCKER.md
+++ b/rtfm/DOCKER.md
@@ -54,7 +54,7 @@ Every other variable can be referenced against the [default PictShare configurat
- MASTER_DELETE_IP (string | ip which can delete any image)
- ALLOWED_SUBNET (CIDR IP range (can be comma separated) | IP subnets which are allowed to upload files)
- ALLOW_BLOATING (true/false | can images be bloated to higher resolutions than the originals)
-- UPLOAD_CODE (string | code that has to be supplied to upload an image)
+- UPLOAD_CODE (string | Code that has to be supplied via POST or GET, to upload an image)
- UPLOAD_FORM_LOCATION (string | absolute path where upload gui will be shown)
- LOW_PROFILE (string | won't display error messages on failed uploads)
- IMAGE_CHANGE_CODE (string | code if provided, needs to be added to image to apply filter/rotation/etc)
diff --git a/templates/main.html b/templates/main.html
index 12ab006..0121c96 100644
--- a/templates/main.html
+++ b/templates/main.html
@@ -58,6 +58,9 @@
";
echo "Allowed file types: ". implode(', ',getAllContentFiletypes());
+
+ if(defined('UPLOAD_CODE') && UPLOAD_CODE!='')
+ echo ' Upload Code: ';
?>