diff --git a/example/partage.conf b/example/partage.conf new file mode 100644 index 0000000..89f3c60 --- /dev/null +++ b/example/partage.conf @@ -0,0 +1,36 @@ +# TCP or unix Socket to listen on. +# When unix sockets are used, the content will be served over FastCGI. +#listen = /var/run/partage-fcgi.sock +listen = 127.0.0.1:9000 + +# Base to use when constructing URI to files uploaded. +# The full URI must be specified, in the form SCHEME://HOST[:PORT] +baseuri = http://127.0.0.1:9000 + +# Drop privilege to the user and group specified. +# When only the user is specified, the default group of the user will +# be used. +#user = www +#group = daemon + +# Change the root directory to the following directory. +# When a chroot is set, all path must be given according to the chroot. +# Note: the configuration file is read before chrooting. +#chroot = /var/www + +# Path to the different path used by the server. Must take into account +# the chroot if set. +rootdir = example/static +tmplpath = example/templates +filepath = example/files +metapath = example/meta + +# URI context that files will be served on +filectx = /f/ + +# Maximum per-file upload size (in bytes) +maxsize = 536870912 # 512Mib + +# Default expiration time (in seconds). An expiration time of 0 seconds +# means no expiration. +expiry = 86400 # 24 hours diff --git a/static/dz.js b/example/static/dz.js similarity index 96% rename from static/dz.js rename to example/static/dz.js index 842512c..9032018 100644 --- a/static/dz.js +++ b/example/static/dz.js @@ -66,7 +66,10 @@ function sendfiles(files) { // e.loaded - how many bytes downloaded // e.lengthComputable = true if the server sent Content-Length header // e.total - total number of bytes (if lengthComputable) - + if (e.lengthComputable) { + progressbar.max = e.total + } + progressbar.value = e.loaded } xhr.onreadystatechange = function() { diff --git a/static/favicon.ico b/example/static/favicon.ico similarity index 100% rename from static/favicon.ico rename to example/static/favicon.ico diff --git a/static/partage.css b/example/static/partage.css similarity index 100% rename from static/partage.css rename to example/static/partage.css diff --git a/static/partage.png b/example/static/partage.png similarity index 100% rename from static/partage.png rename to example/static/partage.png diff --git a/static/robots.txt b/example/static/robots.txt similarity index 100% rename from static/robots.txt rename to example/static/robots.txt diff --git a/templates/index.html b/example/templates/index.html similarity index 95% rename from templates/index.html rename to example/templates/index.html index e5a35ee..3821d4a 100644 --- a/templates/index.html +++ b/example/templates/index.html @@ -6,7 +6,7 @@ - + Partage diff --git a/templates/upload.html b/example/templates/upload.html similarity index 87% rename from templates/upload.html rename to example/templates/upload.html index 1d13d9c..f731132 100644 --- a/templates/upload.html +++ b/example/templates/upload.html @@ -5,13 +5,13 @@ - + Partage
-

partage

+

partage