diff options
| -rw-r--r-- | .mailmap | 5 | ||||
| -rw-r--r-- | Gruntfile.js | 62 | ||||
| -rw-r--r-- | README.md | 74 | ||||
| -rw-r--r-- | css/pomf.css | 27 | ||||
| -rw-r--r-- | js/cabinet.js | 1 | ||||
| -rw-r--r-- | js/cheesesteak.js | 1 | ||||
| -rw-r--r-- | js/pomf.js | 3 | ||||
| -rw-r--r-- | package.json | 17 | ||||
| -rw-r--r-- | pages/bannersca.json | 3 | ||||
| -rw-r--r-- | pages/bannersca.swig | 25 | ||||
| -rw-r--r-- | pages/bannersca/donate.swig | 39 | ||||
| -rw-r--r-- | pages/bannersca/virusscans.swig | 25 | ||||
| -rw-r--r-- | pages/check_fileapica.swig | 25 | ||||
| -rw-r--r-- | pages/check_script.swig | 2 | ||||
| -rw-r--r-- | pages/check_scriptca.swig | 25 | ||||
| -rw-r--r-- | pages/faq.swig | 41 | ||||
| -rw-r--r-- | pages/faqca.swig | 46 | ||||
| -rw-r--r-- | pages/indexca.swig | 37 | ||||
| -rw-r--r-- | pages/layoutca.swig | 38 | ||||
| -rw-r--r-- | pages/nav.swig | 1 | ||||
| -rw-r--r-- | pages/navca.swig | 33 | ||||
| -rw-r--r-- | pages/nojsca.swig | 35 | ||||
| -rw-r--r-- | pages/otherca.swig | 38 | ||||
| -rw-r--r-- | pages/tools.swig | 8 | ||||
| -rw-r--r-- | pages/toolsca.swig | 79 | ||||
| -rw-r--r-- | pages/upload_form_nojs.swig | 4 | ||||
| -rw-r--r-- | pages/upload_formca.swig | 26 | ||||
| -rwxr-xr-x | static/classes/Response.class.php | 4 | ||||
| -rw-r--r-- | static/upload.php | 2 |
29 files changed, 115 insertions, 611 deletions
diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..cabbd3b --- /dev/null +++ b/.mailmap @@ -0,0 +1,5 @@ +Eric Johansson <neku@pomf.se> +Eric Johansson <neku@pomf.se> nokonoko <petanull@gmail.com> +Eliot Whalan <ewhal@pantsu.cat> <contact@pantsu.cat> +Juuso Lapinlampi <wub@partyvan.eu> +alchimist <alchimist@nwa.xyz> cenci0 <alchimist94@gmail.com> diff --git a/Gruntfile.js b/Gruntfile.js index a4f4088..7e01c96 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -16,32 +16,12 @@ module.exports = function (grunt) { 'pages/faq.swig', 'pages/tools.swig', 'pages/other.swig', - 'pages/nojs.swig', - 'pages/indexca.swig', - 'pages/faqca.swig', - 'pages/toolsca.swig', - 'pages/otherca.swig', - 'pages/nojsca.swig' + 'pages/nojs.swig' ], siteUrl: 'https://pantsu.cat/', production: false, } }, - htmlmin: { - dist: { - options: { - removeComments: true, - collapseWhitespace: true, - removeEmptyAttributes: true - }, - files: [{ - expand: true, - cwd: 'dist/', - src: '*.html', - dest: 'dist/' - }] - } - }, uglify: { options: { banner: '/*! <%= pkg.name %> (<%= pkg.repository.url %>) @ <%= grunt.template.today("yyyy-mm-dd") %> */\n' + @@ -70,22 +50,6 @@ module.exports = function (grunt) { } } }, - mkdir: { - options: { - mode: 0700, - create: ['dist/img'] - } - }, - imagemin: { - dist: { - files: [{ - expand: true, - cwd: 'img/', - src: '**/*.{png,jpg,gif}', - dest: 'dist/img/' - }] - } - }, copy: { dist: { files: [{ @@ -93,31 +57,21 @@ module.exports = function (grunt) { cwd: 'static/', src: '**', dest: 'dist/' + }, + { + expand: true, + cwd: 'img/', + src: '**', + dest: 'dist/img/' }] } - }, - jshint: { - options: { - curly: true, - undef: true - }, - all: [ - 'js/pomf.js', - 'js/cabinet.js', - 'js/cheesesteak.js' - ] } }); grunt.loadNpmTasks('grunt-swig'); - grunt.loadNpmTasks('grunt-mkdir'); grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-contrib-imagemin'); - grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.registerTask('default', ['mkdir', 'swig', 'htmlmin', 'cssmin', 'uglify', 'imagemin', 'copy']); - grunt.registerTask('test', ['jshint']); + grunt.registerTask('default', ['swig', 'cssmin', 'uglify', 'copy']); }; @@ -2,6 +2,24 @@ Pomf is a simple file uploading and sharing platform. +## Features + +- One click uploading, no registration required +- A minimal, modern web interface +- Drag & drop supported +- Upload API with multiple response choices + - JSON + - HTML + - Text + - CSV +- Supports [ShareX](https://getsharex.com/) and other screenshot tools + +### Demo + +See the real world example at [Pantsu.cat](https://pantsu.cat/). + +## Requirements + 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. @@ -28,17 +46,20 @@ After this, the pomf site is now compressed and set up inside `dist/`. ## Configuring -The majority of settings are in `static/includes/settings.inc.php`. Read the -comments in that file for more information. +The majority of the settings are in `static/includes/settings.inc.php`. -For file size configuration, there is no server-side verification: we assume -that PHP and Nginx provide ample protection in this department. There is, -however, client-side configuration for max size, the `data-max-size` attribute -on the file input in `pages/upload_form.swig`. +For file size configuration, open `Gruntfile.js` in an editor and modify the +`max_upload_size` value. The value is expressed in mebibytes (MiB). Run `grunt` +again to rebuild the pages for the changes to take effect. -Make sure to disable PHP from being executed on the file download -domain/directory (e.g., `a.pomf.example`), otherwise an attacker can upload a -malicious `.php` file and execute it on your server. +If you intend to allow uploading files larger than 2 MB, you may also need to +increase POST size limits in `php.ini` and webserver configuration. For PHP, +modify `upload_max_filesize` and `post_max_size` values. The configuration +option for nginx webserver is `client_max_body_size`. + +A best practice is to disable executing `.php` files on the `POMF_URL` domain +for uploaded files. This assures that a malicious user cannot execute arbitrary +PHP code on the server. ### Apache @@ -50,11 +71,38 @@ add to your `.htaccess` file: Remember to enable `deflate_module` and `filter_module` modules in your Apache configuration file. +## Getting help + +The Pomf community gathers on IRC. You can also email the maintainer for help. + +- IRC: `#pomfret` on Rizon (`irc.rizon.net`) +- Email: <hostmaster@pantsu.cat> + +## Contributing + +For source code changes, please submit `git-format-patch(1)` formatted patches +via email or come talk to us on IRC to merge your branch. See "Getting help". +At this time, we do not use any Git service issue tracking for issues or pull +requests due to ethical and technical objections. + +We'd really like if you can take some time to make sure your coding style is +consistent with the project. Pomf follows [PHP +PSR-2](http://www.php-fig.org/psr/psr-2/) and [Airbnb JavaScript +(ES5)](https://github.com/airbnb/javascript/tree/master/es5) (`airbnb/legacy`) +coding style guides. We use ESLint and PHPCS tools to enforce these standards. + +You can also help by sending us feature requests or writing documentation and +tests. + +Thanks! + +## Credits + +Pomf was created by Eric Johansson and Peter Lejeck for +[Pomf.se](http://pomf.se/). The software is currently maintained by the +community. + ## License Pomf is free software, and is released under the terms of the Expat license. See `LICENSE`. - -## Contact - -The maintainer can be contacted via <hostmaster@pantsu.cat>. diff --git a/css/pomf.css b/css/pomf.css index 452544d..b582cf3 100644 --- a/css/pomf.css +++ b/css/pomf.css @@ -26,9 +26,7 @@ *, *:before, *:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; } /** @@ -149,7 +147,7 @@ a:focus { .alert-info { background-color: #D9EDF7; border-color: #BCE8F1; - color: #33799B; + color: #167196; } /** @@ -226,9 +224,7 @@ nav > ul > li:last-child:after { * UPLOAD FORM */ #upload-input { - position: absolute; - top: 0; - left: -5000px; + display: none; } /** @@ -297,9 +293,6 @@ nav > ul > li:last-child:after { border: 1px solid white; border-radius: 4px; box-shadow: 0 0 0 1px black; -/* box-shadow: 0 0 0 1px rgb(188, 228, 170); - box-shadow: 0 0 0 1px #468847; - box-shadow: 0 0 0 1px #B7D1A0;*/ color: transparent; display: inline-block; font-size: 0; @@ -312,26 +305,12 @@ nav > ul > li:last-child:after { } .progress-inner { background-color: black; -/* background-color: rgb(188, 228, 170); - background-color: #468847; - background-color: #B7D1A0;*/ height: 6px; margin: 0; width: 0; } /** - * POCKY~ - */ -.pocky { - margin: 20px auto; - text-align: center; -} -.pocky img { - max-width: 100%; -} - -/** * PAGE SPECIFIC STUFF */ span.old { diff --git a/js/cabinet.js b/js/cabinet.js index b820d9b..ba28a33 100644 --- a/js/cabinet.js +++ b/js/cabinet.js @@ -20,7 +20,6 @@ * SOFTWARE. */ -/* jshint browser:true, jquery:true */ (function(cabinet) { cabinet.hasFileAPI = function hasFileAPI() { return Boolean(window.FormData); diff --git a/js/cheesesteak.js b/js/cheesesteak.js index 31a8fd9..6e20880 100644 --- a/js/cheesesteak.js +++ b/js/cheesesteak.js @@ -20,7 +20,6 @@ * SOFTWARE. */ -/* jshint browser:true, jquery:true */ (function() { // Lightweight EventEmitter implementation var EventEmitter = function() {}; @@ -21,7 +21,6 @@ * SOFTWARE. */ -/* jshint browser:true, jquery:true */ $(function() { var $uploadInput = $('#upload-input'); var $uploadBtn = $('#upload-btn'); @@ -30,7 +29,7 @@ $(function() { var $btnContent = ''; var MAX_SIZE = (function(node) { - var max = node.attr('data-max-size') || '120MiB'; + var max = node.attr('data-max-size') || '10MiB'; var num = parseInt(/([0-9,]+).*/.exec(max)[1].replace(',', ''), 10); var unit = /(?:([KMGTPEZY])(i)?B|([BKMGTPEZY]))/.exec(max) || ['B', '', '']; diff --git a/package.json b/package.json index 615c17c..ce2ba8d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "pantsu", - "version": "1.0.0", - "description": "kawaii file host", + "name": "Pomf", + "version": "2.0.0-dev", + "description": "Kawaii file host", "homepage": "https://pantsu.cat/", "repository": { "type": "git", @@ -11,8 +11,7 @@ "contributors": [ "Eric Johansson <neku@pomf.se>", "Peter Lejeck <peter.lejeck@gmail.com>", - "cenci0 <alchimist94@gmail.com>", - "Cupkle <cupkle@openmailbox.org>" + "cenci0 <alchimist94@gmail.com>" ], "license": "MIT", "bugs": { @@ -20,13 +19,9 @@ }, "devDependencies": { "grunt": "^0.4.1", - "grunt-contrib-copy": "^0.8.1", + "grunt-contrib-copy": "^0.8.2", "grunt-contrib-cssmin": "^0.14.0", - "grunt-contrib-htmlmin": "^0.5.0", - "grunt-contrib-imagemin": "^0.9.4", - "grunt-contrib-jshint": "^0.11.3", - "grunt-contrib-uglify": "^0.9.2", - "grunt-mkdir": "^0.1.1", + "grunt-contrib-uglify": "^0.10.0", "grunt-swig": "^0.2.1" } } diff --git a/pages/bannersca.json b/pages/bannersca.json deleted file mode 100644 index 105c5c0..0000000 --- a/pages/bannersca.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "bannersca/virusscans.swig" -] diff --git a/pages/bannersca.swig b/pages/bannersca.swig deleted file mode 100644 index a6e9361..0000000 --- a/pages/bannersca.swig +++ /dev/null @@ -1,25 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -{% for banner in bannersca %} - {% include banner %} -{% endfor %} diff --git a/pages/bannersca/donate.swig b/pages/bannersca/donate.swig deleted file mode 100644 index d246b35..0000000 --- a/pages/bannersca/donate.swig +++ /dev/null @@ -1,39 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -<p class="alert alert-info"> - <strong>pomf.se es un servici gratuït, però la nostra factura d'allotjament no ho és</strong> — necessitem al menys 100$ per mes. Les donacions ajuden a pomf.se a seguir sent gratuït, en línia i ràpid. Tot (quotes includes) està destinat a pagar l'allotjament. - <span class="donate-btns"> - <a class="donate-btn donate-paypal" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BHUVEZY96YZ6N" target="_BLANK"> - <span class="icon icon-paypal"></span> - PayPal - </a> - <a class="donate-btn donate-bitcoin" href="bitcoin:1CrbCGSTFM5ccmjFoU4jRSQod44Ttu8nHY?label=pomf.se&message=Hosting%20Bills" target="_BLANK"> - <span class="icon icon-bitcoin"></span> - Bitcoin - </a> - <a class="donate-btn donate-flattr" href="https://flattr.com/submit/auto?user_id=neku&url=http://pomf.se" target="_BLANK"> - <span class="icon icon-flattr"></span> - Flattr - </a> - </span> -</p> diff --git a/pages/bannersca/virusscans.swig b/pages/bannersca/virusscans.swig deleted file mode 100644 index 23244f9..0000000 --- a/pages/bannersca/virusscans.swig +++ /dev/null @@ -1,25 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -<p class="alert alert-info"> - <strong>Fem ànalisis de virus diariament</strong> — si es detecta un arxiu infectat, serà borrat sense previ avís. -</p> diff --git a/pages/check_fileapica.swig b/pages/check_fileapica.swig deleted file mode 100644 index aa8943e..0000000 --- a/pages/check_fileapica.swig +++ /dev/null @@ -1,25 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -<p id="no-file-api" class="alert alert-error"> - <strong>El teu navegador és una merda.</strong> Instal·la el <a href="http://firefox.com/">Firefox</a> més recent o <a href="http://chrome.google.com/">Botnet</a> i torna <3 -</p> diff --git a/pages/check_script.swig b/pages/check_script.swig index 2da9f79..224c547 100644 --- a/pages/check_script.swig +++ b/pages/check_script.swig @@ -20,5 +20,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} <noscript> - <p class="alert alert-error"><a href="https://no.pantsu.cat">Javascript free version</a></p> + <p class="alert alert-error">This site requires JavaScript. Please enable JavaScript in your browser or use the <a href="nojs.html">JavaScript-free uploader</a>.</p> </noscript> diff --git a/pages/check_scriptca.swig b/pages/check_scriptca.swig deleted file mode 100644 index ac4737c..0000000 --- a/pages/check_scriptca.swig +++ /dev/null @@ -1,25 +0,0 @@ -{# -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -<noscript> - <p class="alert alert-error"><a href="https://no.pantsu.cat">Versió sense Javascript</a></p> -</noscript> diff --git a/pages/faq.swig b/pages/faq.swig index 2bd11de..fcedb56 100644 --- a/pages/faq.swig +++ b/pages/faq.swig @@ -1,6 +1,4 @@ {# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2014 Eric Johansson <neku@pomf.se> Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -25,21 +23,26 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {% block title %}FAQ{% endblock %} {% block body %} -<div class="jumbotron"> - <h1>FAQ</h1> - {% include "nav.swig" %} -</div> -<ul> - <li>Pantsu does NOT support Internet Explorer and older versions of Firefox, Chrome, Opera and Safari.</li> - <li>Uploading tools for Pantsu can be found at Tools. (Currently working to update them all to work with pantsu.cat)</li> - <li>Max file size is {{max_upload_size}}MiB, hopefully I won't have to change this to a even lower number. (read: don't be an ass).</li> - <li>No Child porn, anything else goes until I get a lawsuit I guess. (unless its a virus, because that goes into the being an ass category).</li> - <li>All filetypes are allowed, ALL! (gif,exe,jpg,rar,ass,srt,etc,etc).</li> - <li>No data is collected or logged by us. This won't change. Cloudflare isn't in use</li> - <li>Please contact me at <a href="mailto:contact@pantsu.cat">contact@pantsu.cat</a> for any questions.</li> - <li>If you wish to send me any DMCA requests please contact me at <a href="mailto:abuse@pantsu.cat">abuse@pantsu.cat</a></li> - <li>If any changes to these policies happen you will be informed about them.</li> - <li>I will keep the site as transparent as possible. This will include any files that I remove will be publically listed and have a copy of the DMCA notice. For more information please visit the <a href="//transparency.pantsu.cat">transparency information</a> page.</li> -</ul> -{% include "banners.swig" %} +<article> + <div class="jumbotron"> + <h1><abbr title="Frequently asked questions">FAQ</abbr></h1> + </div> + <h2>What is Pantsu.cat?</h2> + <p><span role="definition"><dfn>Pantsu.cat</dfn> is a simple to use free file hosting service.</span> It lets you share your photos, documents, music, videos and more with others online.</p> + <h2>What content is allowed?</h2> + <p>Pantsu.cat welcomes uploading any content, as long as the content is legal in Australia and you have the legal right to make the content available on our service.</p> + <p>As an exception to this policy to prevent abuse, we do not allow malware on our service. Any malware that could be used to infect other computers may be removed from our service at our discretion.</p> + <h2>Do you keep logs of uploaded content?</h2> + <p>We don't collect or log any data of our users in respect for privacy. We only have files uploaded by our users.</p> + <h2>Can you remove my copyrighted content?</h2> + <p>Please submit your copyright takedown notice to <a href="mailto:abuse@pantsu.cat">abuse@pantsu.cat</a>. We will handle your notice within 24 hours and disable access to infringing content after receiving a notice compliant with the Copyright Act 1968 (Australia).</p> + <h2>Can you remove content that is defaming me or otherwise infringing my non-copyright rights?</h2> + <p>Pantsu.cat respects takedowns for other content when accompanied with a certified Australian court order. If you are unable to obtain the order, a preliminary injuction or court order is typically also sufficient. Please forward the notice to <a href="mailto:abuse@pantsu.cat">abuse@pantsu.cat</a>.</p> + <h2>Can you remove illegal content?</h2> + <p>Please contact the appropriate law enforcement agency if you notice illegal content hosted on Pantsu.cat. We have not been trained or qualified to investigate and fight crimes and enforce the law, so it's not appropriate to send accusations of illegal activity to us. <strong>You must contact the appropriate law enforcement office.</strong> They may then contact us if appropriate.</p> + <p>If you are an Australian law enforcement official and you need our assistance, please contact <a href="mailto:abuse@pantsu.cat">abuse@pantsu.cat</a>. If you are a law enforcement official from another country, we may voluntarily cooperate if the crime you are investigating would also be illegal in Australia.</p> + <h2>I have a question...</h2> + <p>Send us an email at <a href="mailto:contact@pantsu.cat">contact@pantsu.cat</a> and let's talk!</p> +</article> +{% include "nav.swig" %} {% endblock %} diff --git a/pages/faqca.swig b/pages/faqca.swig deleted file mode 100644 index 4debd8c..0000000 --- a/pages/faqca.swig +++ /dev/null @@ -1,46 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2014 Eric Johansson <neku@pomf.se> -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -{% extends "layoutca.swig" %} - -{% block title %}FAQ{% endblock %} -{% block body %} -<div class="jumbotron"> - <h1>FAQ</h1> - {% include "navca.swig" %} -</div> -<ul> - <li>Pantsu no soporta Internet Explorer o versions velles de Firefox, Chrome, Opera o Safari.</li> - <li>Existeixen estris de pujada per a Pantsu en <a href="/toolsca.html">Estris</a>.</li> - <li>El pes màxim per fitxer és de {{max_upload_size}}MiB. Per favor, no abuseu el servici.</li> - <li>No es permiteix pornografia infantil o virus.</li> - <li>Qualsevol tipus de fitxer està permitit (gif,exe,jpg,rar,ass,srt,etc,etc).</li> - <li>No guardem ningun tipus de dades sobre els usuaris, cosa que no canviarà. No utilitzem Cloudflare</li> - <li>Contacteu l'administrador amb l'adreça <a href="mailto:contact@pantsu.cat">contact@pantsu.cat</a> (en anglés).</li> - <li>Envieu qualsevol petició DMCA a <a href="mailto:abuse@pantsu.cat">abuse@pantsu.cat</a></li> - <li>Si canviem la nostra política, t'informarem.</li> - <li>La pàgina intenta ser el més transparent possible. Qualsevol arxiu borrat serà llistat públicament amb la còpia de l'avís DMCA. Per a més informació, visiteu <a href="//transparency.pantsu.cat">informació de transparència</a> page.</li> -</ul> -{% include "bannersca.swig" %} -{% endblock %} diff --git a/pages/indexca.swig b/pages/indexca.swig deleted file mode 100644 index d7b468c..0000000 --- a/pages/indexca.swig +++ /dev/null @@ -1,37 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -{% extends "layoutca.swig" %} - -{% block body %} -<div class="jumbotron"> - <h1>Pantsu~</h1> - <p class="lead">Màxima grandària de pujada {{max_upload_size}}MiB, llig la <a href="faqca.html">FAQ</a></p> - {% include "check_scriptca.swig" %} - {% include "check_fileapica.swig" %} - {% include "upload_formca.swig" %} -</div> -{% include "bannersca.swig" %} -{% include "navca.swig" %} -<script src="pomf.min.js"></script> -{% endblock %} diff --git a/pages/layoutca.swig b/pages/layoutca.swig deleted file mode 100644 index 264cedd..0000000 --- a/pages/layoutca.swig +++ /dev/null @@ -1,38 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -<!DOCTYPE html> -<html lang="ca"> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Pantsu.cat · {% block title %}Allotjament d'Arxius Kawaii{% endblock %}</title> - <link rel="icon" href="favicon.ico"> - <link rel="stylesheet" href="pomf.min.css"> - </head> - <body> - <div class="container"> - {% block body %}Què cony fas ací, baka?{% endblock %} - </div> - </body> -</html> diff --git a/pages/nav.swig b/pages/nav.swig index 90aec20..775174e 100644 --- a/pages/nav.swig +++ b/pages/nav.swig @@ -27,6 +27,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. <li><a href="//git.pantsu.cat/pantsu/pomf">Git</a></li> <li><a href="other.html">Other</a></li> <li><a href="//transparency.pantsu.cat">Transparency</a></li> - <li lang="ca"><a href="indexca.html">Català</a></li> </ul> </nav> diff --git a/pages/navca.swig b/pages/navca.swig deleted file mode 100644 index 748b421..0000000 --- a/pages/navca.swig +++ /dev/null @@ -1,33 +0,0 @@ -{# -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -<nav> - <ul> - <li><a href="indexca.html">Pantsu</a></li> - <li><a href="//p.pantsu.cat/">Text</a></li> - <li><a href="toolsca.html">Estris</a></li> - <li><a href="//git.pantsu.cat/pantsu/pomf">Git</a></li> - <li><a href="otherca.html">Altres</a></li> - <li><a href="//transparency.pantsu.cat">Transparència</a></li> - <li lang="en"><a href="/">English</a></li> - </ul> -</nav> diff --git a/pages/nojsca.swig b/pages/nojsca.swig deleted file mode 100644 index 76378ff..0000000 --- a/pages/nojsca.swig +++ /dev/null @@ -1,35 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -{% extends "layoutca.swig" %} - -{% block body %} -<div class="jumbotron"> - <h1>Pantsu~</h1> - <p class="lead">Màxima grandària de pujada: {{max_upload_size}}MiB, llig la <a href="faqca.html">FAQ</a></p> - {% include "check_fileapica.swig" %} - {% include "upload_form_nojs.swig" %} -</div> -{% include "bannersca.swig" %} -{% include "navca.swig" %} -{% endblock %} diff --git a/pages/otherca.swig b/pages/otherca.swig deleted file mode 100644 index 9f963eb..0000000 --- a/pages/otherca.swig +++ /dev/null @@ -1,38 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -{% extends "layoutca.swig" %} - -{% block title %}Altres Servicis{% endblock %} -{% block body %} -<div class="jumbotron"> - <h1>Altres Servicis</h1> -</div> -<ul> - <li><a href="//git.pantsu.cat">Git</a></li> - <li><a href="firefox/">/g/uia de Firefox</a></li> - <li><a href="http://mg7aqol36qpx7oij.onion/">Servici Ocult</a> - <li><a href="//no.pantsu.cat">Versió sense JS</a> -</ul> -{% include "nav.swig" %} -{% endblock %} diff --git a/pages/tools.swig b/pages/tools.swig index 1a23427..46306d1 100644 --- a/pages/tools.swig +++ b/pages/tools.swig @@ -27,7 +27,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {% block body %} <div class="jumbotron"> <h1>Pomf Tools</h1> -{% include "nav.swig" %} </div> <section> <h2>pomfload</h2> @@ -51,13 +50,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. <h2>1339secure</h2> <dl> <dt>Download</dt> - <dd><a href="https://git.pantsu.cat/pantsucat/pomfsecure">https://git.pantsu.cat/pantsucat/pomfsecure</a></dd> + <dd><a href="https://git.pantsu.cat/pantsu/1339secure">https://git.pantsu.cat/pantsu/1339secure</a></dd> <dt>Contact</dt> <dd><a href="mailto:adriankoshcha@teknik.io">adriankoshcha@teknik.io</a></dd> </dl> </section> <section> - <h2>Sharex</h2> + <h2>ShareX</h2> <dl> <dt>Download</dt> <dd><a href="https://code.google.com/p/sharex/">https://code.google.com/p/sharex/</a></dd> @@ -72,7 +71,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. <dd><a href="https://github.com/pantsu/gyazowin">https://github.com/pantsu/gyazowin</a></dd> <dd><a href="https://i.pantsu.cat/hnpgjr.exe">https://i.pantsu.cat/hnpgjr.exe</a></dd> <dt>Contact</dt> - <dd><a href="https://twitter.com/4vailable">https://twitter.com/4vailable</a></dd> + <dd><a href="https://twitter.com/4vail">https://twitter.com/4vail</a></dd> </dl> </section> +{% include "nav.swig" %} {% endblock %} diff --git a/pages/toolsca.swig b/pages/toolsca.swig deleted file mode 100644 index e037073..0000000 --- a/pages/toolsca.swig +++ /dev/null @@ -1,79 +0,0 @@ -{# -Copyright (c) 2013, 2014 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2013, 2014 Eric Johansson <neku@pomf.se> -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -{% extends "layoutca.swig" %} - -{% block title %}Estris{% endblock %} -{% block body %} -<div class="jumbotron"> -<h1>Pomf Tools</h1> -{% include "nav.swig" %} -</div> -<section> - <h2>pomfload</h2> - <dl> - <dt>Descàrrega</dt> - <dd><a href="https://git.pantsu.cat/pantsu/pomfload">https://git.pantsu.cat/pantsu/pomfload</a></dd> - <dt>Contacte</dt> - <dd><a href="https://twitter.com/AnonymousLink">https://twitter.com/AnonymousLink</a></dd> - </dl> -</section> -<section> - <h2>limf</h2> - <dl> - <dt>Descàrrega</dt> - <dd><a href="https://github.com/lich/limf">https://github.com/lich/limf</a></dd> - <dt>Contacte</dt> - <dd><a href="http://lich.github.io/">http://lich.github.io/</a></dd> - </dl> -</section> -<section> - <h2>1339secure</h2> - <dl> - <dt>Descàrrega</dt> - <dd><a href="https://git.pantsu.cat/pantsucat/pomfsecure">https://git.pantsu.cat/pantsucat/pomfsecure</a></dd> - <dt>Contacte</dt> - <dd><a href="mailto:adriankoshcha@teknik.io">adriankoshcha@teknik.io</a></dd> - </dl> -</section> -<section> - <h2>Sharex</h2> - <dl> - <dt>Descàrrega</dt> - <dd><a href="https://code.google.com/p/sharex/">https://code.google.com/p/sharex/</a></dd> - <dt>Configuració</dt> - <dd><a href="https://p.pantsu.cat/view/raw/fcaeab90">https://p.pantsu.cat/view/raw/fcaeab90</a></dd> - </dl> -</section> -<section> - <h2>Client Gyazo (com el de Puush)</h2> - <dl> - <dt>Descàrrega</dt> - <dd><a href="https://github.com/pantsu/gyazowin">https://github.com/pantsu/gyazowin</a></dd> - <dd><a href="https://i.pantsu.cat/hnpgjr.exe">https://i.pantsu.cat/hnpgjr.exe</a></dd> - <dt>Contacte</dt> - <dd><a href="https://twitter.com/4vailable">https://twitter.com/4vailable</a></dd> - </dl> -</section> -{% endblock %} diff --git a/pages/upload_form_nojs.swig b/pages/upload_form_nojs.swig index 378a1d5..1952a0d 100644 --- a/pages/upload_form_nojs.swig +++ b/pages/upload_form_nojs.swig @@ -1,5 +1,4 @@ {# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -20,8 +19,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} -<form enctype="multipart/form-data" method="post" action="upload.php"> - <input type="hidden" name="output" value="html"> +<form enctype="multipart/form-data" method="post" action="upload.php?output=html"> <input type="file" name="files[]" multiple data-max-size="{{max_upload_size}}MiB"> <input type="submit" value="Submit"> </form> diff --git a/pages/upload_formca.swig b/pages/upload_formca.swig deleted file mode 100644 index 2ba2210..0000000 --- a/pages/upload_formca.swig +++ /dev/null @@ -1,26 +0,0 @@ -{# -Copyright (c) 2013 Peter Lejeck <peter.lejeck@gmail.com> -Copyright (c) 2015 the Pantsu.cat developers <hostmaster@pantsu.cat> -Copyright (c) 2015 Cupkle <cupkle@openmailbox.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#} - -<button id="upload-btn" class="btn" type="button">Selecciona o arrastra fitxers(s) ací</button> -<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/classes/Response.class.php b/static/classes/Response.class.php index 3afcfdb..53fadef 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -164,7 +164,7 @@ class Response 'success' => false, 'errorcode' => $code, 'description' => $description, - )); + ), JSON_PRETTY_PRINT); } private static function json_success($files) @@ -172,6 +172,6 @@ class Response return json_encode(array( 'success' => true, 'files' => $files, - )); + ), JSON_PRETTY_PRINT); } } diff --git a/static/upload.php b/static/upload.php index 655dd9c..a37c549 100644 --- a/static/upload.php +++ b/static/upload.php @@ -80,7 +80,7 @@ function generate_name($file) } // Check if a file with the same name does already exist in the database - $q = $db->prepare('SELECT COUNT(name) FROM pomf WHERE name = (:name)'); + $q = $db->prepare('SELECT COUNT(filename) FROM files WHERE filename = (:name)'); $q->bindValue(':name', $name, PDO::PARAM_STR); $q->execute(); $result = $q->fetchColumn(); |
