Files sharing application made in PHP
Find a file
2017-07-20 12:10:40 +02:00
app Bugfixing maxFilesize method 2017-07-19 18:37:10 +02:00
bootstrap First commit, working 2017-07-19 16:19:11 +02:00
config First commit, working 2017-07-19 16:19:11 +02:00
database First commit, working 2017-07-19 16:19:11 +02:00
public Adding screenshot 2017-07-19 17:11:22 +02:00
resources First commit, working 2017-07-19 16:19:11 +02:00
routes Redirecting / to /upload 2017-07-19 18:23:36 +02:00
storage First commit, working 2017-07-19 16:19:11 +02:00
tests First commit, working 2017-07-19 16:19:11 +02:00
.env.example First commit, working 2017-07-19 16:19:11 +02:00
.gitattributes First commit, working 2017-07-19 16:19:11 +02:00
.gitignore First commit, working 2017-07-19 16:19:11 +02:00
artisan First commit, working 2017-07-19 16:19:11 +02:00
composer.json First commit, working 2017-07-19 16:19:11 +02:00
composer.lock First commit, working 2017-07-19 16:19:11 +02:00
CONTRIBUTING.md Create CONTRIBUTING.md 2017-07-20 09:50:57 +02:00
LICENSE Initial commit 2017-07-19 16:17:15 +02:00
package.json First commit, working 2017-07-19 16:19:11 +02:00
phpunit.xml First commit, working 2017-07-19 16:19:11 +02:00
readme.md Update readme.md 2017-07-20 12:10:40 +02:00
server.php First commit, working 2017-07-19 16:19:11 +02:00
webpack.mix.js First commit, working 2017-07-19 16:19:11 +02:00

Files Sharing

Powered by Laravel

Description

This PHP application based on Laravel 5.4 allows to share files like Wetransfer. You may install it on your own server. It does not require any database system, it works with JSON files in the storage folder. It is multilingual and comes with english and french translations for now. You're welcome to help.

It comes with a droplet (based on Dropzone.js). You may drag and drop some files or directories into the droplet, your files will be uploaded to the server as a bundle.

The bundle is a various number of files between 1 and infinite (based on your configuration). The bundle has a 2 weeks expiry date after the creation of the bundle. This value is not editable yet, this is a todo.

This application provides three links per upload bundle :

Each of these links come with a auth code. This code is the same for the preview and the download links. It is however different for the deletion link.

The application also comes with a Laravel Command (background task) who will physically removed expired bundle files of the storage disk. This command is included in Laravel scheduled commands.

Sorry about the design, I know it's ugly. You're welcome to help and participate.

Requirements

Basically, nothing more than Laravel itself:

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

Plus:

  • JSON PHP Extension (included in PHP 5.2+)
  • ZipArchive PHP Extension (included in PHP 5.3+)

The application also uses:

Installation

  • configure your domain name. For example: files.yourdomain.com
  • clone the repo or download the sources into the webroot folder
  • configure your webserver to point your domain name to the public/ folder
  • run a composer install
  • run a npm install --production
  • make sure that the PHP process has write permission on the ./storage folder
  • configure the application : copy the .env.example file into .env
    • APP_ENV=local change this to "production" if applicable
    • LOCALE=en change this to "fr" or "en"
    • STORAGE_PATH= change this wherever you want to store the files
    • UPLOAD_MAX_FILESIZE=5M change this to the value you want (M, G, T, ...). Attention : you must configure your PHP settings too (post_max_size, upload_max_filesize and memory_limit)
  • generate the Laravel KEY: php artisan key:generate
  • start the Laravel scheduler (it will delete expired bundles of the storage). For example * * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1

Use your browser to navigate to your domain name (example: files.yourdomain.com) and that's it.

Development

If your want to modify the sources, you can use the Laravel Mix features:

  • configure your domain name. For example: files.yourdomain.com
  • clone the repo or download the sources into the webroot folder
  • configure your webserver to point your domain name to the public/ folder
  • run a composer install
  • run a npm install
  • run a npm run watch in order to recompile the assets when changed

Roadmap / Ideas / Improvements

There are many ideas to come. You are welcome to participate.

  • make the expiry date editable per bundle
  • limit upload permission based on an IP address (or IP range) or by a password (or passwords)
  • ability to send link to recipients
  • add unit testing
  • more testing on heavy files
  • customizable (logo, name...)
  • theming
  • responsiveness

Licence

GPL-3.0

Permissions Conditions Limitations
Commercial use Disclose source Liability
Distribution License and copyright notice Warranty
Modification Same license
Patent use State changes
Private use 

https://choosealicense.com/licenses/gpl-3.0/

Welcome on board

If you want to participate or if you want to talk with me : sharing@mabox.eu