mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 10:43:48 +00:00
Compare commits
156 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26e0535407 | ||
|
|
0f8a89bbad | ||
|
|
2f89f6303a | ||
|
|
4b3ca7e34b | ||
|
|
2c0cf43802 | ||
|
|
d255b01c70 | ||
|
|
6a9edc49c0 | ||
|
|
96faf2de0e | ||
|
|
5a2e6a5e53 | ||
|
|
c509eeceb1 | ||
|
|
299292a817 | ||
|
|
b11bd0e521 | ||
|
|
8fb859b441 | ||
|
|
28a5f58b80 | ||
|
|
7da4d1f64b | ||
|
|
07086c7550 | ||
|
|
5246c47c86 | ||
|
|
2975d1555d | ||
|
|
bd946be0b0 | ||
|
|
e6ff90f6fc | ||
|
|
08dc813af9 | ||
|
|
9098634b99 | ||
|
|
00213824f1 | ||
|
|
65624326c7 | ||
|
|
e92d9344b9 | ||
|
|
55cf58fffd | ||
|
|
a3c43af7ba | ||
|
|
a10d394abb | ||
|
|
b16f22b0eb | ||
|
|
5bc66d51be | ||
|
|
7b27fa70d8 | ||
|
|
372b3aa407 | ||
|
|
bda293bc53 | ||
|
|
11873d06ff | ||
|
|
89ea50b893 | ||
|
|
874b4bb768 | ||
|
|
1e49f52abe | ||
|
|
94088e76ec | ||
|
|
c7abcce729 | ||
|
|
e9d2f4bacc | ||
|
|
7e7965f98e | ||
|
|
d823ae687b | ||
|
|
21a36c0965 | ||
|
|
c3d162b991 | ||
|
|
7e325c5101 | ||
|
|
59ff07fb01 | ||
|
|
2ba92ed3b6 | ||
|
|
418c072414 | ||
|
|
397fe6b7e4 | ||
|
|
97d500028a | ||
|
|
527dfeef9f | ||
|
|
1b3baab691 | ||
|
|
5d512f7806 | ||
|
|
0da525f692 | ||
|
|
d076817c9e | ||
|
|
d2af7c1f5e | ||
|
|
ef002f9186 | ||
|
|
f1006355c4 | ||
|
|
ec6087a03c | ||
|
|
2e465f4d03 | ||
|
|
08bf6654fc | ||
|
|
77e29852a5 | ||
|
|
6bc84d4b25 | ||
|
|
d31e2ab98b | ||
|
|
ee14c34671 | ||
|
|
a8b290692e | ||
|
|
441f911560 | ||
|
|
10090b474a | ||
|
|
aff2594ef2 | ||
|
|
66aad7c488 | ||
|
|
896be9c9c9 | ||
|
|
8d1821e05d | ||
|
|
b7014552d2 | ||
|
|
8561556f5c | ||
|
|
58f7479380 | ||
|
|
7b70c81d4d | ||
|
|
1981f39f9e | ||
|
|
e86ea3e5c4 | ||
|
|
8e01b837a2 | ||
|
|
f33fe84350 | ||
|
|
dbbad817c7 | ||
|
|
0eb0939598 | ||
|
|
65f7855703 | ||
|
|
45d482d347 | ||
|
|
1654dc8678 | ||
|
|
cb417ea76d | ||
|
|
17df4aea35 | ||
|
|
714429d8f4 | ||
|
|
0df03f1d32 | ||
|
|
fefc10afb8 | ||
|
|
1658627069 | ||
|
|
16ab540298 | ||
|
|
4e5afa4747 | ||
|
|
d76ff07bf4 | ||
|
|
b38333bb64 | ||
|
|
f863537190 | ||
|
|
a72a672aaf | ||
|
|
a3dd817e7a | ||
|
|
9d9e07d0fa | ||
|
|
30783d0e5d | ||
|
|
3a296f0f9c | ||
|
|
c0d5a771a5 | ||
|
|
8fc7272e38 | ||
|
|
8b8dc34ba6 | ||
|
|
966145d384 | ||
|
|
2b4060cb7b | ||
|
|
9455a361dc | ||
|
|
26132e23a3 | ||
|
|
5acaadeaae | ||
|
|
324f4b1ffa | ||
|
|
0c02952f7a | ||
|
|
f76a4b37e4 | ||
|
|
f33f93006e | ||
|
|
382756a6f0 | ||
|
|
559bee6ca2 | ||
|
|
190fc651ae | ||
|
|
1c62da4e7c | ||
|
|
8a9d2d7f9a | ||
|
|
ae3be12934 | ||
|
|
4683e0d084 | ||
|
|
c55d3f5350 | ||
|
|
7273d60154 | ||
|
|
587daa5ffe | ||
|
|
064e635d35 | ||
|
|
06db522545 | ||
|
|
e5335c2472 | ||
|
|
a2ec066c6d | ||
|
|
15d4ffc349 | ||
|
|
9af9e45b8a | ||
|
|
f30dd38b96 | ||
|
|
d5f3599b9e | ||
|
|
de62ab535c | ||
|
|
8b8562916b | ||
|
|
0d7b920cbe | ||
|
|
f3254a380f | ||
|
|
0e12029efc | ||
|
|
fd6aa5c6b2 | ||
|
|
5be9db83f7 | ||
|
|
12d6b0bf57 | ||
|
|
961462fe54 | ||
|
|
f0e0103d81 | ||
|
|
755523e07b | ||
|
|
c4ace0697b | ||
|
|
69489c4ee2 | ||
|
|
e05d7468b5 | ||
|
|
1a6a91335e | ||
|
|
80de069c7b | ||
|
|
2de8bbe548 | ||
|
|
7ba2a3bec1 | ||
|
|
89fa2fce23 | ||
|
|
84b47416d6 | ||
|
|
55c72cddba | ||
|
|
6effd4a7d9 | ||
|
|
95f6695d00 | ||
|
|
fde7f0f73b | ||
|
|
dd1bffec09 |
@@ -6,7 +6,10 @@ APP_URL=http://localhost
|
||||
APP_DEMO=false
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
SCOUT_DRIVER=tntsearch
|
||||
SCOUT_QUEUE=true
|
||||
|
||||
FILESYSTEM_DRIVER=
|
||||
CHUNK_SIZE=128
|
||||
|
||||
@@ -19,7 +22,7 @@ DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
QUEUE_CONNECTION=database
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
|
||||
@@ -150,13 +150,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -316,13 +318,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -482,13 +486,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -648,13 +654,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -814,13 +822,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -980,13 +990,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -1146,13 +1158,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -1312,13 +1326,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -1478,13 +1494,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -1644,13 +1662,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
@@ -1810,13 +1830,15 @@ namespace PHPSTORM_META {
|
||||
'hash.driver' => \Illuminate\Hashing\BcryptHasher::class,
|
||||
'image' => \Intervention\Image\ImageManager::class,
|
||||
'log' => \Illuminate\Log\LogManager::class,
|
||||
'madzipper' => \Madnest\Madzipper\Madzipper::class,
|
||||
'mail.manager' => \Illuminate\Mail\MailManager::class,
|
||||
'mailer' => \Illuminate\Mail\Mailer::class,
|
||||
'memcached.connector' => \Illuminate\Cache\MemcachedConnector::class,
|
||||
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
|
||||
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
|
||||
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
|
||||
'queue' => \Illuminate\Queue\QueueManager::class,
|
||||
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
|
||||
'queue.connection' => \Illuminate\Queue\DatabaseQueue::class,
|
||||
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
|
||||
'queue.listener' => \Illuminate\Queue\Listener::class,
|
||||
'queue.worker' => \Illuminate\Queue\Worker::class,
|
||||
|
||||
34
README.md
34
README.md
@@ -1,16 +1,6 @@
|
||||

|
||||
# Private Cloud Storage Build on Laravel & Vue.js
|
||||
|
||||
## Supporting VueFileManager
|
||||
Hi, we are trying make the best experience with VueFileManager. There is a lot things to do, and a lot of features we can make.
|
||||
|
||||
But, it can't be done without you, development is more and more complicated and we have to hire new colleagues to help with it. There is couple way you can support us, and then, we support you with all great new features which can be. Thanks you for participating on this awesome software!
|
||||
|
||||
- [Buy me a Coffe](https://www.buymeacoffee.com/pepe)
|
||||
- [One-time donation via PayPal](https://www.paypal.me/peterpapp)
|
||||
- [Become a backer or sponsor on Patreon](https://www.patreon.com/vuefilemanager)
|
||||
- [Purchase Licence on CodeCanyon](https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986)
|
||||
|
||||
## Contents
|
||||
|
||||
- [Installation](#installation)
|
||||
@@ -20,6 +10,8 @@ But, it can't be done without you, development is more and more complicated and
|
||||
- [Chunk Upload](#chunk-upload)
|
||||
- [Upgrade Guide](#upgrade-guide)
|
||||
- [Common Instructions](#common-instructions)
|
||||
- [Update from 1.7.12 to 1.8](#update-from-1712-to-178)
|
||||
- [Update from 1.7.10 to 1.7.11](#update-from-1710-to-1711)
|
||||
- [Update from 1.7.8 to 1.7.9](#update-from-178-to-179)
|
||||
- [Update from 1.7.x to 1.7.8](#update-from-17x-to-178)
|
||||
- [Update from 1.6.x to 1.7](#update-from-16x-to-17)
|
||||
@@ -51,7 +43,6 @@ But, it can't be done without you, development is more and more complicated and
|
||||
- Nginx or Apache
|
||||
|
||||
|
||||
|
||||
**These PHP Extensions are required:**
|
||||
|
||||
- GD
|
||||
@@ -136,13 +127,23 @@ These instructions is applicable for all updates. Please follow this step:
|
||||
|
||||
- Just rewrite all project files with new excluded `/.env` file and `/storage` folder. These items must be preserved!
|
||||
|
||||
### Update from 1.7.12 to 1.8
|
||||
- Before upload new files to your hosting, log in to VueFileManager as Admin. After uploading new files on your webhosting, visit this url `your-domain.com/service/upgrade-database` for upgrading your database.
|
||||
- Just rewrite all project files with new, excluded /.env file and /storage folder. These items must be preserved!
|
||||
- set **QUEUE_CONNECTION** to **database** in your **.env** file
|
||||
- Clear cache in your administration panel - Settings / Application / Clear Cache
|
||||
|
||||
If you are upgrading from GitHub, don't forget run `composer install` to install new vendors.
|
||||
|
||||
### Update from 1.7.10 to 1.7.11
|
||||
Before upload new files to your hosting, log in to VueFileManager as Admin. After uploading new files on your webhosting, visit this url `your-domain.com/service/upgrade-database` for upgrading your database.
|
||||
|
||||
### Update from 1.7.8 to 1.7.9
|
||||
After rewrited old files with new files, log in as admin to the app and go to `your-domain.com/service/upgrade-database`. This will upgrade your database on the background.
|
||||
|
||||
Add the following Cron entry to your server. Just update your php path (if it's different) and project path:
|
||||
```
|
||||
* * * * * /usr/local/bin/php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
|
||||
|
||||
```
|
||||
|
||||
### Update from 1.7.x to 1.7.8
|
||||
@@ -362,6 +363,15 @@ The following support channels are available at your fingertips:
|
||||
- [CodeCanyon support message](https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986/support)
|
||||
- [GitHub repository](https://vuefilemanager.com/github-access)
|
||||
|
||||
## Supporting VueFileManager
|
||||
Hi, we are trying make the best experience with VueFileManager. There is a lot things to do, and a lot of features we can make.
|
||||
|
||||
But, it can't be done without you, development is more and more complicated and we have to hire new colleagues to help with it. There is couple way you can support us, and then, we support you with all great new features which can be. Thanks you for participating on this awesome software!
|
||||
|
||||
- [Buy me a Coffe](https://www.buymeacoffee.com/pepe)
|
||||
- [Become a Patreon](https://www.patreon.com/vuefilemanager)
|
||||
- [One-time donation via PayPal](https://www.paypal.me/peterpapp)
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within this project, please send an e-mail to [peterpapp@makingcg.com](peterpapp@makingcg.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
378
_ide_helper.php
378
_ide_helper.php
@@ -7525,6 +7525,57 @@
|
||||
{
|
||||
/** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
|
||||
return $instance->setConnectionName($name);
|
||||
}
|
||||
/**
|
||||
* Release a reserved job back onto the queue.
|
||||
*
|
||||
* @param string $queue
|
||||
* @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job
|
||||
* @param int $delay
|
||||
* @return mixed
|
||||
* @static
|
||||
*/
|
||||
public static function release($queue, $job, $delay)
|
||||
{
|
||||
/** @var \Illuminate\Queue\DatabaseQueue $instance */
|
||||
return $instance->release($queue, $job, $delay);
|
||||
}
|
||||
/**
|
||||
* Delete a reserved job from the queue.
|
||||
*
|
||||
* @param string $queue
|
||||
* @param string $id
|
||||
* @return void
|
||||
* @throws \Throwable
|
||||
* @static
|
||||
*/
|
||||
public static function deleteReserved($queue, $id)
|
||||
{
|
||||
/** @var \Illuminate\Queue\DatabaseQueue $instance */
|
||||
$instance->deleteReserved($queue, $id);
|
||||
}
|
||||
/**
|
||||
* Get the queue or return the default.
|
||||
*
|
||||
* @param string|null $queue
|
||||
* @return string
|
||||
* @static
|
||||
*/
|
||||
public static function getQueue($queue)
|
||||
{
|
||||
/** @var \Illuminate\Queue\DatabaseQueue $instance */
|
||||
return $instance->getQueue($queue);
|
||||
}
|
||||
/**
|
||||
* Get the underlying database instance.
|
||||
*
|
||||
* @return \Illuminate\Database\Connection
|
||||
* @static
|
||||
*/
|
||||
public static function getDatabase()
|
||||
{
|
||||
/** @var \Illuminate\Queue\DatabaseQueue $instance */
|
||||
return $instance->getDatabase();
|
||||
}
|
||||
/**
|
||||
* Get the retry delay for an object-based queue handler.
|
||||
@@ -7535,7 +7586,7 @@
|
||||
*/
|
||||
public static function getJobRetryDelay($job)
|
||||
{ //Method inherited from \Illuminate\Queue\Queue
|
||||
/** @var \Illuminate\Queue\SyncQueue $instance */
|
||||
/** @var \Illuminate\Queue\DatabaseQueue $instance */
|
||||
return $instance->getJobRetryDelay($job);
|
||||
}
|
||||
/**
|
||||
@@ -7547,7 +7598,7 @@
|
||||
*/
|
||||
public static function getJobExpiration($job)
|
||||
{ //Method inherited from \Illuminate\Queue\Queue
|
||||
/** @var \Illuminate\Queue\SyncQueue $instance */
|
||||
/** @var \Illuminate\Queue\DatabaseQueue $instance */
|
||||
return $instance->getJobExpiration($job);
|
||||
}
|
||||
/**
|
||||
@@ -7559,7 +7610,7 @@
|
||||
*/
|
||||
public static function createPayloadUsing($callback)
|
||||
{ //Method inherited from \Illuminate\Queue\Queue
|
||||
\Illuminate\Queue\SyncQueue::createPayloadUsing($callback);
|
||||
\Illuminate\Queue\DatabaseQueue::createPayloadUsing($callback);
|
||||
}
|
||||
/**
|
||||
* Set the IoC container instance.
|
||||
@@ -7570,7 +7621,7 @@
|
||||
*/
|
||||
public static function setContainer($container)
|
||||
{ //Method inherited from \Illuminate\Queue\Queue
|
||||
/** @var \Illuminate\Queue\SyncQueue $instance */
|
||||
/** @var \Illuminate\Queue\DatabaseQueue $instance */
|
||||
$instance->setContainer($container);
|
||||
}
|
||||
|
||||
@@ -14446,6 +14497,324 @@
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Madnest\Madzipper\Facades {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
class Madzipper {
|
||||
/**
|
||||
* Create a new zip Archive if the file does not exists
|
||||
* opens a zip archive if the file exists
|
||||
*
|
||||
* @param $pathToFile string The file to open
|
||||
* @param \Madnest\Madzipper\RepositoryInterface|string $type The type of the archive, defaults to zip, possible are zip, phar
|
||||
* @throws \RuntimeException
|
||||
* @throws \Exception
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \Madnest\Madzipper\Madzipper Madzipper instance
|
||||
* @static
|
||||
*/
|
||||
public static function make($pathToFile, $type = 'zip')
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->make($pathToFile, $type);
|
||||
}
|
||||
/**
|
||||
* Create a new zip archive or open an existing one
|
||||
*
|
||||
* @param $pathToFile
|
||||
* @throws \Exception
|
||||
* @return \Madnest\Madzipper\Madzipper
|
||||
* @static
|
||||
*/
|
||||
public static function zip($pathToFile)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->zip($pathToFile);
|
||||
}
|
||||
/**
|
||||
* Create a new phar file or open one
|
||||
*
|
||||
* @param $pathToFile
|
||||
* @throws \Exception
|
||||
* @return \Madnest\Madzipper\Madzipper
|
||||
* @static
|
||||
*/
|
||||
public static function phar($pathToFile)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->phar($pathToFile);
|
||||
}
|
||||
/**
|
||||
* Create a new rar file or open one
|
||||
*
|
||||
* @param $pathToFile
|
||||
* @throws \Exception
|
||||
* @return \Madnest\Madzipper\Madzipper
|
||||
* @static
|
||||
*/
|
||||
public static function rar($pathToFile)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->rar($pathToFile);
|
||||
}
|
||||
/**
|
||||
* Extracts the opened zip archive to the specified location <br/>
|
||||
* you can provide an array of files and folders and define if they should be a white list
|
||||
* or a black list to extract. By default this method compares file names using "string starts with" logic
|
||||
*
|
||||
* @param $path string The path to extract to
|
||||
* @param array $files An array of files
|
||||
* @param int $methodFlags The Method the files should be treated
|
||||
* @throws \Exception
|
||||
* @static
|
||||
*/
|
||||
public static function extractTo($path, $files = [], $methodFlags = 2)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->extractTo($path, $files, $methodFlags);
|
||||
}
|
||||
/**
|
||||
* Extracts matching files/folders from the opened zip archive to the specified location.
|
||||
*
|
||||
* @param string $extractToPath The path to extract to
|
||||
* @param string $regex regular expression used to match files. See @link http://php.net/manual/en/reference.pcre.pattern.syntax.php
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws \RuntimeException
|
||||
* @static
|
||||
*/
|
||||
public static function extractMatchingRegex($extractToPath, $regex)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->extractMatchingRegex($extractToPath, $regex);
|
||||
}
|
||||
/**
|
||||
* Gets the content of a single file if available
|
||||
*
|
||||
* @param $filePath string The full path (including all folders) of the file in the zip
|
||||
* @throws \Exception
|
||||
* @return mixed returns the content or throws an exception
|
||||
* @static
|
||||
*/
|
||||
public static function getFileContent($filePath)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getFileContent($filePath);
|
||||
}
|
||||
/**
|
||||
* Add one or multiple files to the zip.
|
||||
*
|
||||
* @param $pathToAdd array|string An array or string of files and folders to add
|
||||
* @param null|mixed $fileName
|
||||
* @return \Madnest\Madzipper\Madzipper Madzipper instance
|
||||
* @static
|
||||
*/
|
||||
public static function add($pathToAdd, $fileName = null)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->add($pathToAdd, $fileName);
|
||||
}
|
||||
/**
|
||||
* Add an empty directory
|
||||
*
|
||||
* @param $dirName
|
||||
* @return \Madzipper
|
||||
* @static
|
||||
*/
|
||||
public static function addEmptyDir($dirName)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->addEmptyDir($dirName);
|
||||
}
|
||||
/**
|
||||
* Add a file to the zip using its contents
|
||||
*
|
||||
* @param $filename string The name of the file to create
|
||||
* @param $content string The file contents
|
||||
* @return \Madnest\Madzipper\Madzipper Madzipper instance
|
||||
* @static
|
||||
*/
|
||||
public static function addString($filename, $content)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->addString($filename, $content);
|
||||
}
|
||||
/**
|
||||
* Gets the status of the zip.
|
||||
*
|
||||
* @return int The status of the internal zip file
|
||||
* @static
|
||||
*/
|
||||
public static function getStatus()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getStatus();
|
||||
}
|
||||
/**
|
||||
* Remove a file or array of files and folders from the zip archive
|
||||
*
|
||||
* @param $fileToRemove array|string The path/array to the files in the zip
|
||||
* @return \Madnest\Madzipper\Madzipper Madzipper instance
|
||||
* @static
|
||||
*/
|
||||
public static function remove($fileToRemove)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->remove($fileToRemove);
|
||||
}
|
||||
/**
|
||||
* Returns the path of the current zip file if there is one.
|
||||
*
|
||||
* @return string The path to the file
|
||||
* @static
|
||||
*/
|
||||
public static function getFilePath()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getFilePath();
|
||||
}
|
||||
/**
|
||||
* Sets the password to be used for decompressing
|
||||
*
|
||||
* @param $password
|
||||
* @return bool
|
||||
* @static
|
||||
*/
|
||||
public static function usePassword($password)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->usePassword($password);
|
||||
}
|
||||
/**
|
||||
* Closes the zip file and frees all handles
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function close()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->close();
|
||||
}
|
||||
/**
|
||||
* Sets the internal folder to the given path.<br/>
|
||||
* Useful for extracting only a segment of a zip file.
|
||||
*
|
||||
* @param $path
|
||||
* @return \Madnest\Madzipper\Madzipper
|
||||
* @static
|
||||
*/
|
||||
public static function folder($path)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->folder($path);
|
||||
}
|
||||
/**
|
||||
* Resets the internal folder to the root of the zip file.
|
||||
*
|
||||
* @return \Madnest\Madzipper\Madzipper
|
||||
* @static
|
||||
*/
|
||||
public static function home()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->home();
|
||||
}
|
||||
/**
|
||||
* Deletes the archive file
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function delete()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->delete();
|
||||
}
|
||||
/**
|
||||
* Get the type of the Archive
|
||||
*
|
||||
* @return string
|
||||
* @static
|
||||
*/
|
||||
public static function getArchiveType()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getArchiveType();
|
||||
}
|
||||
/**
|
||||
* Get the current internal folder pointer
|
||||
*
|
||||
* @return string
|
||||
* @static
|
||||
*/
|
||||
public static function getCurrentFolderPath()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getCurrentFolderPath();
|
||||
}
|
||||
/**
|
||||
* Checks if a file is present in the archive
|
||||
*
|
||||
* @param $fileInArchive
|
||||
* @return bool
|
||||
* @static
|
||||
*/
|
||||
public static function contains($fileInArchive)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->contains($fileInArchive);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return \Madnest\Madzipper\RepositoryInterface
|
||||
* @static
|
||||
*/
|
||||
public static function getRepository()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getRepository();
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return \Madnest\Madzipper\Filesystem
|
||||
* @static
|
||||
*/
|
||||
public static function getFileHandler()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getFileHandler();
|
||||
}
|
||||
/**
|
||||
* Gets the path to the internal folder
|
||||
*
|
||||
* @return string
|
||||
* @static
|
||||
*/
|
||||
public static function getInternalPath()
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->getInternalPath();
|
||||
}
|
||||
/**
|
||||
* List all files that are within the archive
|
||||
*
|
||||
* @param string|null $regexFilter regular expression to filter returned files/folders. See @link http://php.net/manual/en/reference.pcre.pattern.syntax.php
|
||||
* @throws \RuntimeException
|
||||
* @return array
|
||||
* @static
|
||||
*/
|
||||
public static function listFiles($regexFilter = null)
|
||||
{
|
||||
/** @var \Madnest\Madzipper\Madzipper $instance */
|
||||
return $instance->listFiles($regexFilter);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17425,6 +17794,7 @@ namespace {
|
||||
class Stripe extends \Cartalyst\Stripe\Laravel\Facades\Stripe {}
|
||||
class Crawler extends \Jaybizzle\LaravelCrawlerDetect\Facades\LaravelCrawlerDetect {}
|
||||
class Flare extends \Facade\Ignition\Facades\Flare {}
|
||||
class Madzipper extends \Madnest\Madzipper\Facades\Madzipper {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
namespace App\Console;
|
||||
|
||||
use App\Console\Commands\Deploy;
|
||||
//use App\Console\Commands\SetupDevelopmentEnvironment;
|
||||
|
||||
// use App\Console\Commands\SetupDevelopmentEnvironment;
|
||||
use App\Console\Commands\SetupDevEnvironment;
|
||||
use App\Console\Commands\SetupProductionEnvironment;
|
||||
use App\Console\Commands\UpgradeApp;
|
||||
use App\Share;
|
||||
use App\Zip;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
@@ -21,7 +23,7 @@ class Kernel extends ConsoleKernel
|
||||
*/
|
||||
protected $commands = [
|
||||
Deploy::class,
|
||||
//SetupDevelopmentEnvironment::class,
|
||||
// SetupDevelopmentEnvironment::class,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -34,7 +36,16 @@ class Kernel extends ConsoleKernel
|
||||
{
|
||||
$schedule->call(function () {
|
||||
$this->delete_expired_shared_links();
|
||||
})->hourly();
|
||||
})->everyMinute();
|
||||
|
||||
$schedule->call(function () {
|
||||
$this->delete_old_zips();
|
||||
})->everySixHours();
|
||||
|
||||
// Run queue jobs every minute
|
||||
$schedule->command('queue:work --tries=3')
|
||||
->everyMinute()
|
||||
->withoutOverlapping();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,6 +60,24 @@ class Kernel extends ConsoleKernel
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete old zips
|
||||
*/
|
||||
protected function delete_old_zips(): void
|
||||
{
|
||||
// Get all zips
|
||||
$zips = Zip::where('created_at', '<=', Carbon::now()->subDay()->toDateTimeString())->get();
|
||||
|
||||
$zips->each(function ($zip) {
|
||||
|
||||
// Delete zip file
|
||||
\Storage::disk('local')->delete('zip/' . $zip->basename);
|
||||
|
||||
// Delete zip record
|
||||
$zip->delete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get and delete expired shared links
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,7 @@ use Illuminate\Support\Str;
|
||||
use Laravel\Scout\Searchable;
|
||||
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
|
||||
use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
|
||||
/**
|
||||
* App\FileManagerFile
|
||||
@@ -52,10 +53,13 @@ use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\FileManagerFile withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\FileManagerFile withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
* @property array|null $metadata
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileManagerFile sortable($defaultParameters = null)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileManagerFile whereMetadata($value)
|
||||
*/
|
||||
class FileManagerFile extends Model
|
||||
{
|
||||
use Searchable, SoftDeletes;
|
||||
use Searchable, SoftDeletes , Sortable;
|
||||
|
||||
public $public_access = null;
|
||||
|
||||
@@ -67,6 +71,20 @@ class FileManagerFile extends Model
|
||||
'file_url'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'metadata' => 'array',
|
||||
];
|
||||
|
||||
/**
|
||||
* Sortable columns
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $sortable = [
|
||||
'name',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
/**
|
||||
* Set routes with public access
|
||||
*
|
||||
@@ -148,7 +166,9 @@ class FileManagerFile extends Model
|
||||
// Get file from external storage
|
||||
if (is_storage_driver(['s3', 'spaces', 'wasabi', 'backblaze'])) {
|
||||
|
||||
$file_pretty_name = get_pretty_name($this->attributes['basename'], $this->attributes['name'], $this->attributes['mimetype']);
|
||||
$file_pretty_name = is_storage_driver('backblaze')
|
||||
? Str::snake(mb_strtolower($this->attributes['name']))
|
||||
: get_pretty_name($this->attributes['basename'], $this->attributes['name'], $this->attributes['mimetype']);
|
||||
|
||||
$header = [
|
||||
"ResponseAcceptRanges" => "bytes",
|
||||
|
||||
@@ -11,6 +11,7 @@ use RecursiveArrayIterator;
|
||||
use RecursiveIteratorIterator;
|
||||
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
|
||||
use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
|
||||
/**
|
||||
* App\FileManagerFolder
|
||||
@@ -58,10 +59,11 @@ use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\FileManagerFolder withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\FileManagerFolder withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileManagerFolder sortable($defaultParameters = null)
|
||||
*/
|
||||
class FileManagerFolder extends Model
|
||||
{
|
||||
use Searchable, SoftDeletes;
|
||||
use Searchable, SoftDeletes , Sortable;
|
||||
|
||||
protected $guarded = [
|
||||
'id'
|
||||
@@ -71,6 +73,16 @@ class FileManagerFolder extends Model
|
||||
'items', 'trashed_items'
|
||||
];
|
||||
|
||||
/**
|
||||
* Sortable columns
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public $sortable = [
|
||||
'name',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
/**
|
||||
* Index folder
|
||||
*
|
||||
|
||||
@@ -102,7 +102,7 @@ class UserController extends Controller
|
||||
public function users()
|
||||
{
|
||||
return new UsersCollection(
|
||||
User::sortable()->paginate('20')
|
||||
User::sortable(['created_at', 'DESC'])->paginate('20')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\FileManagerFolder;
|
||||
use App\Http\Tools\Editor;
|
||||
use App\Http\Tools\Guardian;
|
||||
use App\Share;
|
||||
use App\User;
|
||||
use App\Zip;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -13,7 +16,11 @@ use Illuminate\Http\Request;
|
||||
use App\FileManagerFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Http\Exceptions\HttpResponseException;
|
||||
use Madnest\Madzipper\Facades\Madzipper;
|
||||
use Response;
|
||||
use League\Flysystem\FileNotFoundException;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class FileAccessController extends Controller
|
||||
{
|
||||
@@ -84,9 +91,63 @@ class FileAccessController extends Controller
|
||||
$this->check_file_access($shared, $file);
|
||||
}
|
||||
|
||||
// Store user download size
|
||||
$request->user()->record_download((int)$file->getRawOriginal('filesize'));
|
||||
|
||||
return $this->download_file($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get generated zip for user
|
||||
*
|
||||
* @param $id
|
||||
* @return \Symfony\Component\HttpFoundation\StreamedResponse
|
||||
*/
|
||||
public function get_zip($id)
|
||||
{
|
||||
$zip = Zip::where('id', $id)
|
||||
->where('user_id', Auth::id())
|
||||
->first();
|
||||
|
||||
$zip_path = 'zip/' . $zip->basename;
|
||||
|
||||
$header = [
|
||||
"Content-Type" => 'application/zip',
|
||||
"Content-Length" => Storage::disk('local')->size($zip_path),
|
||||
"Accept-Ranges" => "bytes",
|
||||
"Content-Range" => "bytes 0-600/" . Storage::disk('local')->size($zip_path),
|
||||
"Content-Disposition" => "attachment; filename=" . $zip->basename,
|
||||
];
|
||||
|
||||
return Storage::disk('local')->download($zip_path, $zip->basename, $header);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get generated zip for guest
|
||||
*
|
||||
* @param $id
|
||||
* @param $token
|
||||
* @return \Symfony\Component\HttpFoundation\StreamedResponse
|
||||
*/
|
||||
public function get_zip_public($id, $token)
|
||||
{
|
||||
$zip = Zip::where('id', $id)
|
||||
->where('shared_token', $token)
|
||||
->first();
|
||||
|
||||
$zip_path = 'zip/' . $zip->basename;
|
||||
|
||||
$header = [
|
||||
"Content-Type" => 'application/zip',
|
||||
"Content-Length" => Storage::disk('local')->size($zip_path),
|
||||
"Accept-Ranges" => "bytes",
|
||||
"Content-Range" => "bytes 0-600/" . Storage::disk('local')->size($zip_path),
|
||||
"Content-Disposition" => "attachment; filename=" . $zip->basename,
|
||||
];
|
||||
|
||||
return Storage::disk('local')->download($zip_path, $zip->basename, $header);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file public
|
||||
*
|
||||
@@ -113,6 +174,9 @@ class FileAccessController extends Controller
|
||||
// Check file access
|
||||
$this->check_file_access($shared, $file);
|
||||
|
||||
// Store user download size
|
||||
User::find($shared->user_id)->record_download((int)$file->getRawOriginal('filesize'));
|
||||
|
||||
return $this->download_file($file);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class BrowseController extends Controller
|
||||
->with(['parent'])
|
||||
->where('user_id', $user_id)
|
||||
->whereIn('unique_id', filter_folders_ids($folders_trashed))
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Get files trashed
|
||||
@@ -43,6 +44,7 @@ class BrowseController extends Controller
|
||||
->with(['parent'])
|
||||
->where('user_id', $user_id)
|
||||
->whereNotIn('folder_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'unique_id'))))
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
@@ -72,11 +74,13 @@ class BrowseController extends Controller
|
||||
$folders = FileManagerFolder::with(['parent', 'shared:token,id,item_id,permission,protected,expire_in'])
|
||||
->where('user_id', $user_id)
|
||||
->whereIn('unique_id', $folder_ids)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = FileManagerFile::with(['parent', 'shared:token,id,item_id,permission,protected,expire_in'])
|
||||
->where('user_id', $user_id)
|
||||
->whereIn('unique_id', $file_ids)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
@@ -91,7 +95,9 @@ class BrowseController extends Controller
|
||||
public function latest() {
|
||||
|
||||
// Get User
|
||||
$user = User::with(['latest_uploads'])
|
||||
$user = User::with(['latest_uploads' => function($query) {
|
||||
$query->sortable();
|
||||
}])
|
||||
->where('id', Auth::id())
|
||||
->first();
|
||||
|
||||
@@ -106,8 +112,11 @@ class BrowseController extends Controller
|
||||
public function participant_uploads() {
|
||||
|
||||
// Get User
|
||||
$uploads = FileManagerFile::with(['parent'])->where('user_id', Auth::id())
|
||||
->whereUserScope('editor')->orderBy('created_at', 'DESC')->get();
|
||||
$uploads = FileManagerFile::with(['parent'])
|
||||
->where('user_id', Auth::id())
|
||||
->whereUserScope('editor')
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
return $uploads;
|
||||
}
|
||||
@@ -132,12 +141,14 @@ class BrowseController extends Controller
|
||||
->with('parent')
|
||||
->where('user_id', $user_id)
|
||||
->where('parent_id', $unique_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = FileManagerFile::onlyTrashed()
|
||||
->with('parent')
|
||||
->where('user_id', $user_id)
|
||||
->where('folder_id', $unique_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
@@ -148,13 +159,13 @@ class BrowseController extends Controller
|
||||
$folders = FileManagerFolder::with(['parent', 'shared:token,id,item_id,permission,protected,expire_in'])
|
||||
->where('user_id', $user_id)
|
||||
->where('parent_id', $unique_id)
|
||||
->orderBy('created_at', 'DESC')
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = FileManagerFile::with(['parent', 'shared:token,id,item_id,permission,protected,expire_in'])
|
||||
->where('user_id', $user_id)
|
||||
->where('folder_id', $unique_id)
|
||||
->orderBy('created_at', 'DESC')
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
@@ -171,6 +182,7 @@ class BrowseController extends Controller
|
||||
$folders = FileManagerFolder::with('folders:id,parent_id,unique_id,name')
|
||||
->where('parent_id', 0)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get(['id', 'parent_id', 'unique_id', 'name']);
|
||||
|
||||
return [
|
||||
@@ -193,33 +205,17 @@ class BrowseController extends Controller
|
||||
{
|
||||
// Get user
|
||||
$user_id = Auth::id();
|
||||
$query = remove_accents($request->input('query'));
|
||||
|
||||
// Search files id db
|
||||
$searched_files = FileManagerFile::search($request->input('query'))
|
||||
$searched_files = FileManagerFile::search($query)
|
||||
->where('user_id', $user_id)
|
||||
->get();
|
||||
$searched_folders = FileManagerFolder::search($request->input('query'))
|
||||
$searched_folders = FileManagerFolder::search($query)
|
||||
->where('user_id', $user_id)
|
||||
->get();
|
||||
|
||||
// Collect folders and files to single array
|
||||
return collect([$searched_folders, $searched_files])->collapse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file record
|
||||
*
|
||||
* @param $unique_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function file_detail($unique_id)
|
||||
{
|
||||
// Get user id
|
||||
$user_id = Auth::id();
|
||||
|
||||
return FileManagerFile::with(['shared:token,id,item_id,permission,protected,expire_in'])
|
||||
->where('user_id', $user_id)
|
||||
->where('unique_id', $unique_id)
|
||||
->firstOrFail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ use App\Http\Requests\FileFunctions\UploadRequest;
|
||||
use App\Http\Tools\Demo;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Tools\Guardian;
|
||||
@@ -168,40 +169,43 @@ class EditItemsController extends Controller
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
* @throws Exception
|
||||
*/
|
||||
public function user_delete_item(DeleteItemRequest $request, $unique_id)
|
||||
public function user_delete_item(DeleteItemRequest $request)
|
||||
{
|
||||
// Demo preview
|
||||
if (is_demo(Auth::id())) {
|
||||
return Demo::response_204();
|
||||
}
|
||||
|
||||
// Check permission to delete item for authenticated editor
|
||||
if ($request->user()->tokenCan('editor')) {
|
||||
foreach ($request->input('data') as $file) {
|
||||
$unique_id = $file['unique_id'];
|
||||
|
||||
// Prevent force delete for non-master users
|
||||
if ($request->input('data.force_delete')) abort('401');
|
||||
// Check permission to delete item for authenticated editor
|
||||
if ($request->user()->tokenCan('editor')) {
|
||||
|
||||
// check if shared_token cookie exist
|
||||
if (!$request->hasCookie('shared_token')) abort('401');
|
||||
// Prevent force delete for non-master users
|
||||
if ($file['force_delete']) abort('401');
|
||||
|
||||
// Get shared token
|
||||
$shared = get_shared($request->cookie('shared_token'));
|
||||
// check if shared_token cookie exist
|
||||
if (!$request->hasCookie('shared_token')) abort('401');
|
||||
|
||||
// Get file|folder item
|
||||
$item = get_item($request->input('data.type'), $unique_id, Auth::id());
|
||||
// Get shared token
|
||||
$shared = get_shared($request->cookie('shared_token'));
|
||||
|
||||
// Check access to requested directory
|
||||
if ($request->input('data.type') === 'folder') {
|
||||
Guardian::check_item_access($item->unique_id, $shared);
|
||||
} else {
|
||||
Guardian::check_item_access($item->folder_id, $shared);
|
||||
// Get file|folder item
|
||||
$item = get_item($file['type'], $unique_id, Auth::id());
|
||||
|
||||
// Check access to requested directory
|
||||
if ($file['type'] === 'folder') {
|
||||
Guardian::check_item_access($item->unique_id, $shared);
|
||||
} else {
|
||||
Guardian::check_item_access($item->folder_id, $shared);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete item
|
||||
Editor::delete_item($file, $unique_id);
|
||||
}
|
||||
|
||||
// Delete item
|
||||
Editor::delete_item($request, $unique_id);
|
||||
|
||||
// Return response
|
||||
return response(null, 204);
|
||||
}
|
||||
|
||||
@@ -214,7 +218,7 @@ class EditItemsController extends Controller
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
* @throws Exception
|
||||
*/
|
||||
public function guest_delete_item(DeleteItemRequest $request, $unique_id, $token)
|
||||
public function guest_delete_item(DeleteItemRequest $request, $token)
|
||||
{
|
||||
// Get shared record
|
||||
$shared = get_shared($token);
|
||||
@@ -227,19 +231,22 @@ class EditItemsController extends Controller
|
||||
// Check shared permission
|
||||
if (!is_editor($shared)) abort(403);
|
||||
|
||||
// Get file|folder item
|
||||
$item = get_item($request->input('data.type'), $unique_id, $shared->user_id);
|
||||
foreach ($request->input('data') as $file) {
|
||||
$unique_id = $file['unique_id'];
|
||||
|
||||
// Check access to requested item
|
||||
if ($request->input('data.type') === 'folder') {
|
||||
Guardian::check_item_access($item->unique_id, $shared);
|
||||
} else {
|
||||
Guardian::check_item_access($item->folder_id, $shared);
|
||||
// Get file|folder item
|
||||
$item = get_item($file['type'], $unique_id, $shared->user_id);
|
||||
|
||||
// Check access to requested item
|
||||
if ($file['type'] === 'folder') {
|
||||
Guardian::check_item_access($item->unique_id, $shared);
|
||||
} else {
|
||||
Guardian::check_item_access($item->folder_id, $shared);
|
||||
}
|
||||
|
||||
// Delete item
|
||||
Editor::delete_item($file, $unique_id, $shared);
|
||||
}
|
||||
|
||||
// Delete item
|
||||
Editor::delete_item($request, $unique_id, $shared);
|
||||
|
||||
// Return response
|
||||
return response(null, 204);
|
||||
}
|
||||
@@ -309,19 +316,13 @@ class EditItemsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Move item for authenticated master|editor user
|
||||
* User download multiple files via zip
|
||||
*
|
||||
* @param MoveItemRequest $request
|
||||
* @param $unique_id
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
* @param Request $request
|
||||
* @return string
|
||||
*/
|
||||
public function user_move(MoveItemRequest $request, $unique_id)
|
||||
public function user_zip_multiple_files(Request $request)
|
||||
{
|
||||
// Demo preview
|
||||
if (is_demo(Auth::id())) {
|
||||
return Demo::response_204();
|
||||
}
|
||||
|
||||
// Check permission to upload for authenticated editor
|
||||
if ($request->user()->tokenCan('editor')) {
|
||||
|
||||
@@ -331,12 +332,98 @@ class EditItemsController extends Controller
|
||||
// Get shared token
|
||||
$shared = get_shared($request->cookie('shared_token'));
|
||||
|
||||
$file_parent_folders = FileManagerFile::whereUserId(Auth::id())
|
||||
->whereIn('unique_id', $request->input('files'))
|
||||
->get()
|
||||
->pluck('folder_id')
|
||||
->toArray();
|
||||
|
||||
// Check access to requested directory
|
||||
Guardian::check_item_access($request->to_unique_id, $shared);
|
||||
Guardian::check_item_access($file_parent_folders, $shared);
|
||||
}
|
||||
|
||||
// Get requested files
|
||||
$files = FileManagerFile::whereUserId(Auth::id())
|
||||
->whereIn('unique_id', $request->input('files'))
|
||||
->get();
|
||||
|
||||
$zip = Editor::zip_files($files);
|
||||
|
||||
// Get file
|
||||
return response([
|
||||
'url' => route('zip', $zip->id),
|
||||
'name' => $zip->basename,
|
||||
], 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Guest download multiple files via zip
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $token
|
||||
* @return string
|
||||
*/
|
||||
public function guest_zip_multiple_files(Request $request, $token)
|
||||
{
|
||||
// Get shared record
|
||||
$shared = get_shared($token);
|
||||
|
||||
$file_parent_folders = FileManagerFile::whereUserId($shared->user_id)
|
||||
->whereIn('unique_id', $request->input('files'))
|
||||
->get()
|
||||
->pluck('folder_id')
|
||||
->toArray();
|
||||
|
||||
// Check access to requested directory
|
||||
Guardian::check_item_access($file_parent_folders, $shared);
|
||||
|
||||
// Get requested files
|
||||
$files = FileManagerFile::whereUserId($shared->user_id)
|
||||
->whereIn('unique_id', $request->input('files'))
|
||||
->get();
|
||||
|
||||
$zip = Editor::zip_files($files, $shared);
|
||||
|
||||
// Get file
|
||||
return response([
|
||||
'url' => route('zip_public', [
|
||||
'id' => $zip->id,
|
||||
'token' => $shared->token,
|
||||
]),
|
||||
'name' => $zip->basename,
|
||||
], 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move item for authenticated master|editor user
|
||||
*
|
||||
* @param MoveItemRequest $request
|
||||
* @param $unique_id
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function user_move(MoveItemRequest $request)
|
||||
{
|
||||
// Demo preview
|
||||
if (is_demo(Auth::id())) {
|
||||
return Demo::response_204();
|
||||
}
|
||||
|
||||
$to_unique_id = $request->input('to_unique_id');
|
||||
|
||||
// Check permission to upload for authenticated editor
|
||||
if ($request->user()->tokenCan('editor')) {
|
||||
// check if shared_token cookie exist
|
||||
if (!$request->hasCookie('shared_token')) abort('401');
|
||||
|
||||
// Get shared token
|
||||
$shared = get_shared($request->cookie('shared_token'));
|
||||
|
||||
// Check access to requested directory
|
||||
Guardian::check_item_access($to_unique_id, $shared);
|
||||
}
|
||||
|
||||
// Move item
|
||||
Editor::move($request, $unique_id);
|
||||
Editor::move($request, $to_unique_id);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
@@ -349,11 +436,14 @@ class EditItemsController extends Controller
|
||||
* @param $token
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
*/
|
||||
public function guest_move(MoveItemRequest $request, $unique_id, $token)
|
||||
public function guest_move(MoveItemRequest $request, $token)
|
||||
{
|
||||
// Get shared record
|
||||
$shared = get_shared($token);
|
||||
|
||||
//Unique id of Folder where move
|
||||
$to_unique_id = $request->input('to_unique_id');
|
||||
|
||||
// Demo preview
|
||||
if (is_demo(Auth::id())) {
|
||||
return Demo::response_204();
|
||||
@@ -362,23 +452,28 @@ class EditItemsController extends Controller
|
||||
// Check shared permission
|
||||
if (!is_editor($shared)) abort(403);
|
||||
|
||||
$moving_unique_id = $unique_id;
|
||||
foreach ($request->input('items') as $item) {
|
||||
|
||||
if ($request->from_type !== 'folder') {
|
||||
$file = FileManagerFile::where('unique_id', $unique_id)
|
||||
->where('user_id', $shared->user_id)
|
||||
->firstOrFail();
|
||||
$unique_id = $item['unique_id'];
|
||||
$moving_unique_id = $unique_id;
|
||||
|
||||
$moving_unique_id = $file->folder_id;
|
||||
|
||||
if ($item['type'] !== 'folder') {
|
||||
$file = FileManagerFile::where('unique_id', $unique_id)
|
||||
->where('user_id', $shared->user_id)
|
||||
->firstOrFail();
|
||||
|
||||
$moving_unique_id = $file->folder_id;
|
||||
}
|
||||
|
||||
// Check access to requested item
|
||||
Guardian::check_item_access([
|
||||
$to_unique_id, $moving_unique_id
|
||||
], $shared);
|
||||
}
|
||||
|
||||
// Check access to requested item
|
||||
Guardian::check_item_access([
|
||||
$request->to_unique_id, $moving_unique_id
|
||||
], $shared);
|
||||
|
||||
// Move item
|
||||
Editor::move($request, $unique_id, $shared);
|
||||
Editor::move($request, $to_unique_id, $shared);
|
||||
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@ class FavouriteController extends Controller
|
||||
public function store(Request $request)
|
||||
{
|
||||
// Validate request
|
||||
$validator = Validator::make($request->all(), [
|
||||
'unique_id' => 'required|integer',
|
||||
$validator = Validator::make($request->input('folders'), [
|
||||
'*.unique_id' => 'required|integer',
|
||||
]);
|
||||
|
||||
// Return error
|
||||
if ($validator->fails()) abort(400, 'Bad input');
|
||||
|
||||
foreach($request->input('folders') as $item) {
|
||||
|
||||
// Get user & folder
|
||||
$user = Auth::user();
|
||||
$folder = FileManagerFolder::where('unique_id', $request->unique_id)->first();
|
||||
$folder = FileManagerFolder::where('unique_id', $item['unique_id'])->first();
|
||||
|
||||
if (is_demo($user->id)) {
|
||||
return Demo::favourites($user);
|
||||
@@ -39,8 +41,9 @@ class FavouriteController extends Controller
|
||||
if ($folder->user_id !== $user->id) abort(403);
|
||||
|
||||
// Add folder to user favourites
|
||||
$user->favourite_folders()->syncWithoutDetaching($request->unique_id);
|
||||
$user->favourite_folders()->syncWithoutDetaching($item['unique_id']);
|
||||
|
||||
}
|
||||
// Return updated favourites
|
||||
return $user->favourite_folders;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\FileFunctions;
|
||||
use App\Http\Requests\Share\CreateShareRequest;
|
||||
use App\Http\Requests\Share\UpdateShareRequest;
|
||||
use App\Http\Resources\ShareResource;
|
||||
use App\Zip;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -93,15 +94,25 @@ class ShareController extends Controller
|
||||
* @return ResponseFactory|\Illuminate\Http\Response
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function destroy($token)
|
||||
public function destroy(Request $request)
|
||||
{
|
||||
// Get sharing record
|
||||
$shared = Share::where('token', $token)
|
||||
->where('user_id', Auth::id())
|
||||
->firstOrFail();
|
||||
foreach($request->input('tokens') as $token) {
|
||||
|
||||
// Delete shared record
|
||||
$shared->delete();
|
||||
// Get sharing record
|
||||
Share::where('token', $token)
|
||||
->where('user_id', Auth::id())
|
||||
->firstOrFail()
|
||||
->delete();
|
||||
|
||||
// Get zip record
|
||||
$zip = Zip::where('shared_token', $token)
|
||||
->where('user_id', Auth::id())
|
||||
->first();
|
||||
|
||||
if ($zip) {
|
||||
$zip->delete();
|
||||
}
|
||||
}
|
||||
|
||||
// Done
|
||||
return response('Done!', 204);
|
||||
|
||||
@@ -171,5 +171,25 @@ class UpgradeAppController extends Controller
|
||||
echo 'Operation failed.';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Upgrade expire_in in shares table
|
||||
*
|
||||
* @since v1.7.11
|
||||
*/
|
||||
if (! Schema::hasColumn('file_manager_files', 'metadata')) {
|
||||
|
||||
$command = Artisan::call('migrate', [
|
||||
'--force' => true
|
||||
]);
|
||||
|
||||
if ($command === 0) {
|
||||
echo 'Operation was successful.';
|
||||
}
|
||||
|
||||
if ($command === 1) {
|
||||
echo 'Operation failed.';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,10 @@ class FileSharingController extends Controller
|
||||
->first();
|
||||
|
||||
if ($image) {
|
||||
|
||||
// Store user download size
|
||||
User::find($shared->user_id)->record_download((int) $image->getRawOriginal('filesize'));
|
||||
|
||||
return $this->show_image($image);
|
||||
}
|
||||
}
|
||||
@@ -247,6 +251,7 @@ class FileSharingController extends Controller
|
||||
$folders = FileManagerFolder::with('folders:id,parent_id,unique_id,name')
|
||||
->where('parent_id', $shared->item_id)
|
||||
->where('user_id', $shared->user_id)
|
||||
->sortable()
|
||||
->get(['id', 'parent_id', 'unique_id', 'name']);
|
||||
|
||||
// Return folder tree
|
||||
@@ -277,6 +282,7 @@ class FileSharingController extends Controller
|
||||
$folders = FileManagerFolder::with('folders:id,parent_id,unique_id,name')
|
||||
->where('parent_id', $shared->item_id)
|
||||
->where('user_id', $shared->user_id)
|
||||
->sortable()
|
||||
->get(['id', 'parent_id', 'unique_id', 'name']);
|
||||
|
||||
// Return folder tree
|
||||
@@ -399,10 +405,12 @@ class FileSharingController extends Controller
|
||||
{
|
||||
$folders = FileManagerFolder::where('user_id', $shared->user_id)
|
||||
->where('parent_id', $unique_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = FileManagerFile::where('user_id', $shared->user_id)
|
||||
->where('folder_id', $unique_id)
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
return [$folders, $files];
|
||||
|
||||
@@ -107,7 +107,15 @@ class AccountController extends Controller
|
||||
*/
|
||||
public function update_user_settings(Request $request)
|
||||
{
|
||||
// TODO: validation
|
||||
// Validate request
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'string',
|
||||
'value' => 'string',
|
||||
]);
|
||||
|
||||
// Return error
|
||||
if ($validator->fails()) abort(400, 'Bad input');
|
||||
|
||||
// Get user
|
||||
$user = Auth::user();
|
||||
|
||||
|
||||
@@ -355,6 +355,25 @@ function format_gigabytes($gigabytes)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Format string to formated megabytes string
|
||||
*
|
||||
* @param $megabytes
|
||||
* @return string
|
||||
*/
|
||||
function format_megabytes($megabytes)
|
||||
{
|
||||
if ($megabytes >= 1000) {
|
||||
return $megabytes / 1000 . 'GB';
|
||||
}
|
||||
|
||||
if ($megabytes >= 1000000) {
|
||||
return $megabytes / 1000000 . 'TB';
|
||||
}
|
||||
|
||||
return $megabytes . 'MB';
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert megabytes to bytes
|
||||
*
|
||||
@@ -528,4 +547,189 @@ function get_pretty_name($basename, $name, $mimetype)
|
||||
}
|
||||
|
||||
return $name . '.' . $mimetype;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get exif data from jpeg image
|
||||
*
|
||||
* @param $file
|
||||
* @return array
|
||||
*/
|
||||
function get_image_meta_data($file)
|
||||
{
|
||||
if (get_file_type_from_mimetype($file->getMimeType()) === 'jpeg') {
|
||||
return exif_read_data($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if app is in dev mode
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_dev()
|
||||
{
|
||||
return env('APP_ENV') === 'local' ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $str
|
||||
* @return bool
|
||||
*/
|
||||
function seems_utf8($str)
|
||||
{
|
||||
$length = strlen($str);
|
||||
for ($i=0; $i < $length; $i++) {
|
||||
$c = ord($str[$i]);
|
||||
if ($c < 0x80) $n = 0; # 0bbbbbbb
|
||||
elseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb
|
||||
elseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb
|
||||
elseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb
|
||||
elseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb
|
||||
elseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b
|
||||
else return false; # Does not match any model
|
||||
for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?
|
||||
if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts all accent characters to ASCII characters.
|
||||
*
|
||||
* If there are no accent characters, then the string given is just returned.
|
||||
*
|
||||
* @param string $string Text that might have accent characters
|
||||
* @return string Filtered string with replaced "nice" characters.
|
||||
*/
|
||||
function remove_accents($string) {
|
||||
if ( !preg_match('/[\x80-\xff]/', $string) )
|
||||
return $string;
|
||||
|
||||
if (seems_utf8($string)) {
|
||||
$chars = array(
|
||||
// Decompositions for Latin-1 Supplement
|
||||
chr(195).chr(128) => 'A', chr(195).chr(129) => 'A',
|
||||
chr(195).chr(130) => 'A', chr(195).chr(131) => 'A',
|
||||
chr(195).chr(132) => 'A', chr(195).chr(133) => 'A',
|
||||
chr(195).chr(135) => 'C', chr(195).chr(136) => 'E',
|
||||
chr(195).chr(137) => 'E', chr(195).chr(138) => 'E',
|
||||
chr(195).chr(139) => 'E', chr(195).chr(140) => 'I',
|
||||
chr(195).chr(141) => 'I', chr(195).chr(142) => 'I',
|
||||
chr(195).chr(143) => 'I', chr(195).chr(145) => 'N',
|
||||
chr(195).chr(146) => 'O', chr(195).chr(147) => 'O',
|
||||
chr(195).chr(148) => 'O', chr(195).chr(149) => 'O',
|
||||
chr(195).chr(150) => 'O', chr(195).chr(153) => 'U',
|
||||
chr(195).chr(154) => 'U', chr(195).chr(155) => 'U',
|
||||
chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y',
|
||||
chr(195).chr(159) => 's', chr(195).chr(160) => 'a',
|
||||
chr(195).chr(161) => 'a', chr(195).chr(162) => 'a',
|
||||
chr(195).chr(163) => 'a', chr(195).chr(164) => 'a',
|
||||
chr(195).chr(165) => 'a', chr(195).chr(167) => 'c',
|
||||
chr(195).chr(168) => 'e', chr(195).chr(169) => 'e',
|
||||
chr(195).chr(170) => 'e', chr(195).chr(171) => 'e',
|
||||
chr(195).chr(172) => 'i', chr(195).chr(173) => 'i',
|
||||
chr(195).chr(174) => 'i', chr(195).chr(175) => 'i',
|
||||
chr(195).chr(177) => 'n', chr(195).chr(178) => 'o',
|
||||
chr(195).chr(179) => 'o', chr(195).chr(180) => 'o',
|
||||
chr(195).chr(181) => 'o', chr(195).chr(182) => 'o',
|
||||
chr(195).chr(182) => 'o', chr(195).chr(185) => 'u',
|
||||
chr(195).chr(186) => 'u', chr(195).chr(187) => 'u',
|
||||
chr(195).chr(188) => 'u', chr(195).chr(189) => 'y',
|
||||
chr(195).chr(191) => 'y',
|
||||
// Decompositions for Latin Extended-A
|
||||
chr(196).chr(128) => 'A', chr(196).chr(129) => 'a',
|
||||
chr(196).chr(130) => 'A', chr(196).chr(131) => 'a',
|
||||
chr(196).chr(132) => 'A', chr(196).chr(133) => 'a',
|
||||
chr(196).chr(134) => 'C', chr(196).chr(135) => 'c',
|
||||
chr(196).chr(136) => 'C', chr(196).chr(137) => 'c',
|
||||
chr(196).chr(138) => 'C', chr(196).chr(139) => 'c',
|
||||
chr(196).chr(140) => 'C', chr(196).chr(141) => 'c',
|
||||
chr(196).chr(142) => 'D', chr(196).chr(143) => 'd',
|
||||
chr(196).chr(144) => 'D', chr(196).chr(145) => 'd',
|
||||
chr(196).chr(146) => 'E', chr(196).chr(147) => 'e',
|
||||
chr(196).chr(148) => 'E', chr(196).chr(149) => 'e',
|
||||
chr(196).chr(150) => 'E', chr(196).chr(151) => 'e',
|
||||
chr(196).chr(152) => 'E', chr(196).chr(153) => 'e',
|
||||
chr(196).chr(154) => 'E', chr(196).chr(155) => 'e',
|
||||
chr(196).chr(156) => 'G', chr(196).chr(157) => 'g',
|
||||
chr(196).chr(158) => 'G', chr(196).chr(159) => 'g',
|
||||
chr(196).chr(160) => 'G', chr(196).chr(161) => 'g',
|
||||
chr(196).chr(162) => 'G', chr(196).chr(163) => 'g',
|
||||
chr(196).chr(164) => 'H', chr(196).chr(165) => 'h',
|
||||
chr(196).chr(166) => 'H', chr(196).chr(167) => 'h',
|
||||
chr(196).chr(168) => 'I', chr(196).chr(169) => 'i',
|
||||
chr(196).chr(170) => 'I', chr(196).chr(171) => 'i',
|
||||
chr(196).chr(172) => 'I', chr(196).chr(173) => 'i',
|
||||
chr(196).chr(174) => 'I', chr(196).chr(175) => 'i',
|
||||
chr(196).chr(176) => 'I', chr(196).chr(177) => 'i',
|
||||
chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij',
|
||||
chr(196).chr(180) => 'J', chr(196).chr(181) => 'j',
|
||||
chr(196).chr(182) => 'K', chr(196).chr(183) => 'k',
|
||||
chr(196).chr(184) => 'k', chr(196).chr(185) => 'L',
|
||||
chr(196).chr(186) => 'l', chr(196).chr(187) => 'L',
|
||||
chr(196).chr(188) => 'l', chr(196).chr(189) => 'L',
|
||||
chr(196).chr(190) => 'l', chr(196).chr(191) => 'L',
|
||||
chr(197).chr(128) => 'l', chr(197).chr(129) => 'L',
|
||||
chr(197).chr(130) => 'l', chr(197).chr(131) => 'N',
|
||||
chr(197).chr(132) => 'n', chr(197).chr(133) => 'N',
|
||||
chr(197).chr(134) => 'n', chr(197).chr(135) => 'N',
|
||||
chr(197).chr(136) => 'n', chr(197).chr(137) => 'N',
|
||||
chr(197).chr(138) => 'n', chr(197).chr(139) => 'N',
|
||||
chr(197).chr(140) => 'O', chr(197).chr(141) => 'o',
|
||||
chr(197).chr(142) => 'O', chr(197).chr(143) => 'o',
|
||||
chr(197).chr(144) => 'O', chr(197).chr(145) => 'o',
|
||||
chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe',
|
||||
chr(197).chr(148) => 'R',chr(197).chr(149) => 'r',
|
||||
chr(197).chr(150) => 'R',chr(197).chr(151) => 'r',
|
||||
chr(197).chr(152) => 'R',chr(197).chr(153) => 'r',
|
||||
chr(197).chr(154) => 'S',chr(197).chr(155) => 's',
|
||||
chr(197).chr(156) => 'S',chr(197).chr(157) => 's',
|
||||
chr(197).chr(158) => 'S',chr(197).chr(159) => 's',
|
||||
chr(197).chr(160) => 'S', chr(197).chr(161) => 's',
|
||||
chr(197).chr(162) => 'T', chr(197).chr(163) => 't',
|
||||
chr(197).chr(164) => 'T', chr(197).chr(165) => 't',
|
||||
chr(197).chr(166) => 'T', chr(197).chr(167) => 't',
|
||||
chr(197).chr(168) => 'U', chr(197).chr(169) => 'u',
|
||||
chr(197).chr(170) => 'U', chr(197).chr(171) => 'u',
|
||||
chr(197).chr(172) => 'U', chr(197).chr(173) => 'u',
|
||||
chr(197).chr(174) => 'U', chr(197).chr(175) => 'u',
|
||||
chr(197).chr(176) => 'U', chr(197).chr(177) => 'u',
|
||||
chr(197).chr(178) => 'U', chr(197).chr(179) => 'u',
|
||||
chr(197).chr(180) => 'W', chr(197).chr(181) => 'w',
|
||||
chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y',
|
||||
chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z',
|
||||
chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z',
|
||||
chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z',
|
||||
chr(197).chr(190) => 'z', chr(197).chr(191) => 's',
|
||||
// Euro Sign
|
||||
chr(226).chr(130).chr(172) => 'E',
|
||||
// GBP (Pound) Sign
|
||||
chr(194).chr(163) => '');
|
||||
|
||||
$string = strtr($string, $chars);
|
||||
} else {
|
||||
// Assume ISO-8859-1 if not UTF-8
|
||||
$chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158)
|
||||
.chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194)
|
||||
.chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202)
|
||||
.chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210)
|
||||
.chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218)
|
||||
.chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227)
|
||||
.chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235)
|
||||
.chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243)
|
||||
.chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251)
|
||||
.chr(252).chr(253).chr(255);
|
||||
|
||||
$chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy";
|
||||
|
||||
$string = strtr($string, $chars['in'], $chars['out']);
|
||||
$double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254));
|
||||
$double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th');
|
||||
$string = str_replace($double_chars['in'], $double_chars['out'], $string);
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,9 @@ class DeleteItemRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'data.type' => 'required|string',
|
||||
'data.force_delete' => 'required|boolean',
|
||||
'data[*].force_delete' => 'required|boolean',
|
||||
'data[*].type' => 'required|string',
|
||||
'data[*].unique_id' => 'required|integer'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,9 @@ class MoveItemRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'to_unique_id' => 'required|integer',
|
||||
'from_type' => 'required|string',
|
||||
'to_unique_id' => 'required|integer',
|
||||
'items[*].type' => 'required|string',
|
||||
'items[*].unique_id' => 'required|integer',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Requests\FileFunctions;
|
||||
|
||||
use App\Rules\MimetypeBlacklistValidation;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
@@ -26,7 +27,7 @@ class UploadRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'parent_id' => 'required|integer',
|
||||
'file' => 'required|file',
|
||||
'file' => ['required','file' , new MimetypeBlacklistValidation]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class StoreUpgradeAccountRequest extends FormRequest
|
||||
'plan.data.attributes.capacity' => 'required|digits_between:1,9',
|
||||
'plan.data.attributes.capacity_formatted' => 'required|string',
|
||||
'plan.data.attributes.currency' => 'required|string',
|
||||
'plan.data.attributes.description' => 'required|string',
|
||||
'plan.data.attributes.description' => 'sometimes|string|nullable',
|
||||
'plan.data.attributes.name' => 'required|string',
|
||||
'plan.data.attributes.price' => 'required|string',
|
||||
'plan.data.id' => 'required|string',
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\FileManagerFile;
|
||||
use App\FileManagerFolder;
|
||||
use App\Http\Requests\FileFunctions\RenameItemRequest;
|
||||
use App\User;
|
||||
use App\Zip;
|
||||
use Aws\Exception\MultipartUploadException;
|
||||
use Aws\S3\MultipartUploader;
|
||||
use Carbon\Carbon;
|
||||
@@ -18,11 +19,83 @@ use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Intervention\Image\ImageManagerStatic as Image;
|
||||
use League\Flysystem\FileNotFoundException;
|
||||
use Madnest\Madzipper\Facades\Madzipper;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
|
||||
class Editor
|
||||
{
|
||||
|
||||
/**
|
||||
* Zip selected files, store it in /zip folder and retrieve zip record
|
||||
*
|
||||
* @param $files
|
||||
* @param null $shared
|
||||
* @return mixed
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
public static function zip_files($files, $shared = null)
|
||||
{
|
||||
// Local storage instance
|
||||
$disk_local = Storage::disk('local');
|
||||
|
||||
// Create zip directory
|
||||
if (!$disk_local->exists('zip')) {
|
||||
$disk_local->makeDirectory('zip');
|
||||
}
|
||||
|
||||
// Move file to local storage from external storage service
|
||||
if (!is_storage_driver('local')) {
|
||||
|
||||
// Create temp directory
|
||||
if (!$disk_local->exists('temp')) {
|
||||
$disk_local->makeDirectory('temp');
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
try {
|
||||
$disk_local->put('temp/' . $file['basename'], Storage::get('file-manager/' . $file['basename']));
|
||||
} catch (FileNotFoundException $e) {
|
||||
throw new HttpException(404, 'File not found');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get zip path
|
||||
$zip_name = Str::random(16) . '.zip';
|
||||
$zip_path = 'zip/' . $zip_name;
|
||||
|
||||
// Create zip
|
||||
$zip = Madzipper::make(storage_path() . '/app/' . $zip_path);
|
||||
|
||||
// Get files folder on local storage drive
|
||||
$files_directory = is_storage_driver('local') ? 'file-manager' : 'temp';
|
||||
|
||||
// Add files to zip
|
||||
$files->each(function ($file) use ($zip, $files_directory) {
|
||||
$zip->addString($file['name'], File::get(storage_path() . '/app/' . $files_directory . '/' . $file['basename']));
|
||||
});
|
||||
|
||||
// Close zip
|
||||
$zip->close();
|
||||
|
||||
// Delete temporary files
|
||||
if (!is_storage_driver('local')) {
|
||||
|
||||
$files->each(function ($file) use ($disk_local) {
|
||||
$disk_local->delete('temp/' . $file['basename']);
|
||||
});
|
||||
}
|
||||
|
||||
// Store zip record
|
||||
return Zip::create([
|
||||
'user_id' => $shared->user_id ?? Auth::id(),
|
||||
'shared_token' => $shared->token ?? null,
|
||||
'basename' => $zip_name,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new directory
|
||||
*
|
||||
@@ -86,13 +159,13 @@ class Editor
|
||||
* @param null $shared
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function delete_item($request, $unique_id, $shared = null)
|
||||
public static function delete_item($file, $unique_id, $shared = null)
|
||||
{
|
||||
// Get user id
|
||||
$user = is_null($shared) ? Auth::user() : User::findOrFail($shared->user_id);
|
||||
|
||||
// Delete folder
|
||||
if ($request->input('data.type') === 'folder') {
|
||||
if ($file['type'] === 'folder') {
|
||||
|
||||
// Get folder
|
||||
$folder = FileManagerFolder::withTrashed()
|
||||
@@ -113,7 +186,7 @@ class Editor
|
||||
}
|
||||
|
||||
// Force delete children files
|
||||
if ($request->input('data.force_delete')) {
|
||||
if ($file['force_delete']) {
|
||||
|
||||
// Get children folder ids
|
||||
$child_folders = filter_folders_ids($folder->trashed_folders, 'unique_id');
|
||||
@@ -142,7 +215,7 @@ class Editor
|
||||
}
|
||||
|
||||
// Soft delete items
|
||||
if (!$request->input('data.force_delete')) {
|
||||
if (!$file['force_delete']) {
|
||||
|
||||
// Remove folder from user favourites
|
||||
$user->favourite_folders()->detach($unique_id);
|
||||
@@ -153,10 +226,10 @@ class Editor
|
||||
}
|
||||
|
||||
// Delete item
|
||||
if ($request->input('data.type') !== 'folder') {
|
||||
if ($file['type'] !== 'folder') {
|
||||
|
||||
// Get file
|
||||
$file = FileManagerFile::withTrashed()
|
||||
$item = FileManagerFile::withTrashed()
|
||||
->where('user_id', $user->id)
|
||||
->where('unique_id', $unique_id)
|
||||
->first();
|
||||
@@ -173,23 +246,23 @@ class Editor
|
||||
}
|
||||
|
||||
// Force delete file
|
||||
if ($request->input('data.force_delete')) {
|
||||
if ($file['force_delete']) {
|
||||
|
||||
// Delete file
|
||||
Storage::delete('/file-manager/' . $file->basename);
|
||||
Storage::delete('/file-manager/' . $item->basename);
|
||||
|
||||
// Delete thumbnail if exist
|
||||
if ($file->thumbnail) Storage::delete('/file-manager/' . $file->getRawOriginal('thumbnail'));
|
||||
if ($item->thumbnail) Storage::delete('/file-manager/' . $item->getRawOriginal('thumbnail'));
|
||||
|
||||
// Delete file permanently
|
||||
$file->forceDelete();
|
||||
$item->forceDelete();
|
||||
}
|
||||
|
||||
// Soft delete file
|
||||
if (!$request->input('data.force_delete')) {
|
||||
if (!$file['force_delete']) {
|
||||
|
||||
// Soft delete file
|
||||
$file->delete();
|
||||
$item->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,32 +274,36 @@ class Editor
|
||||
* @param $unique_id
|
||||
* @param null $shared
|
||||
*/
|
||||
public static function move($request, $unique_id, $shared = null)
|
||||
public static function move($request, $to_unique_id, $shared = null)
|
||||
{
|
||||
// Get user id
|
||||
$user_id = is_null($shared) ? Auth::id() : $shared->user_id;
|
||||
|
||||
if ($request->from_type === 'folder') {
|
||||
foreach ($request->input('items') as $item) {
|
||||
$unique_id = $item['unique_id'];
|
||||
|
||||
// Move folder
|
||||
$item = FileManagerFolder::where('user_id', $user_id)
|
||||
->where('unique_id', $unique_id)
|
||||
->firstOrFail();
|
||||
if ($item['type'] === 'folder') {
|
||||
|
||||
$item->update([
|
||||
'parent_id' => $request->to_unique_id
|
||||
]);
|
||||
// Move folder
|
||||
$item = FileManagerFolder::where('user_id', $user_id)
|
||||
->where('unique_id', $unique_id)
|
||||
->firstOrFail();
|
||||
|
||||
} else {
|
||||
$item->update([
|
||||
'parent_id' => $to_unique_id
|
||||
]);
|
||||
|
||||
// Move file under new folder
|
||||
$item = FileManagerFile::where('user_id', $user_id)
|
||||
->where('unique_id', $unique_id)
|
||||
->firstOrFail();
|
||||
} else {
|
||||
|
||||
$item->update([
|
||||
'folder_id' => $request->to_unique_id
|
||||
]);
|
||||
// Move file under new folder
|
||||
$item = FileManagerFile::where('user_id', $user_id)
|
||||
->where('unique_id', $unique_id)
|
||||
->firstOrFail();
|
||||
|
||||
$item->update([
|
||||
'folder_id' => $to_unique_id
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,12 +328,26 @@ class Editor
|
||||
$disk_file_name = basename('chunks/' . $file->getClientOriginalName(), '.part');
|
||||
$temp_filename = $file->getClientOriginalName();
|
||||
|
||||
// Generate file
|
||||
File::append(config('filesystems.disks.local.root') . '/chunks/' . $temp_filename, $file->get());
|
||||
// File Path
|
||||
$file_path = config('filesystems.disks.local.root') . '/chunks/' . $temp_filename;\
|
||||
|
||||
// Generate file
|
||||
File::append($file_path, $file->get());
|
||||
|
||||
// Size of file
|
||||
$file_size = File::size($file_path);
|
||||
|
||||
// Size of limit
|
||||
$limit = get_setting('upload_limit');
|
||||
|
||||
// File size handling
|
||||
if( $limit && $file_size > format_bytes($limit)) abort(413);
|
||||
|
||||
// If last then process file
|
||||
if ($request->boolean('is_last')) {
|
||||
|
||||
$metadata = get_image_meta_data($file);
|
||||
|
||||
$disk_local = Storage::disk('local');
|
||||
$unique_id = get_unique_id();
|
||||
|
||||
@@ -292,6 +383,7 @@ class Editor
|
||||
'mimetype' => get_file_type_from_mimetype($file_mimetype),
|
||||
'type' => get_file_type($file_mimetype),
|
||||
'folder_id' => $request->parent_id,
|
||||
'metadata' => $metadata,
|
||||
'name' => $user_file_name,
|
||||
'unique_id' => $unique_id,
|
||||
'basename' => $disk_file_name,
|
||||
@@ -301,6 +393,19 @@ class Editor
|
||||
'user_id' => $user_id,
|
||||
];
|
||||
|
||||
// Store user upload size
|
||||
if ($request->user()) {
|
||||
|
||||
// If upload a loged user
|
||||
$request->user()->record_upload($file_size);
|
||||
|
||||
} else {
|
||||
|
||||
// If upload guest
|
||||
User::find($shared->user_id)->record_upload($file_size);
|
||||
|
||||
}
|
||||
|
||||
// Return new file
|
||||
return FileManagerFile::create($options);
|
||||
}
|
||||
|
||||
42
app/Rules/MimetypeBlacklistValidation.php
Normal file
42
app/Rules/MimetypeBlacklistValidation.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Rules;
|
||||
use Illuminate\Contracts\Validation\Rule;
|
||||
|
||||
class MimetypeBlacklistValidation implements Rule
|
||||
{
|
||||
/**
|
||||
* Create a new rule instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the validation rule passes.
|
||||
*
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
public function passes($attribute, $value)
|
||||
{
|
||||
$mimetype_blacklist = explode(',' ,get_setting('mimetypes_blacklist'));
|
||||
$file_mimetype = explode('/' ,$value->getMimeType());
|
||||
|
||||
return !array_intersect($file_mimetype , $mimetype_blacklist);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function message()
|
||||
{
|
||||
abort (415,'Type of this mime type is not allowed.');
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Share whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Share whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $expire_in
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Share whereExpireIn($value)
|
||||
*/
|
||||
class Share extends Model
|
||||
{
|
||||
|
||||
30
app/Traffic.php
Normal file
30
app/Traffic.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Traffic
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $upload
|
||||
* @property int $download
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic whereDownload($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic whereUpload($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Traffic whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Traffic extends Model
|
||||
{
|
||||
protected $fillable = ['user_id', 'upload', 'download'];
|
||||
}
|
||||
50
app/User.php
50
app/User.php
@@ -5,6 +5,7 @@ namespace App;
|
||||
use App\Notifications\ResetPassword;
|
||||
use App\Notifications\ResetUserPasswordNotification;
|
||||
use ByteUnits\Metric;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@@ -157,10 +158,10 @@ class User extends Authenticatable
|
||||
$is_storage_limit = $storage_limitation ? $storage_limitation : 1;
|
||||
|
||||
// Get user storage usage
|
||||
if (! $is_storage_limit) {
|
||||
if (!$is_storage_limit) {
|
||||
|
||||
return [
|
||||
'used' => $this->used_capacity,
|
||||
'used' => $this->used_capacity,
|
||||
'used_formatted' => Metric::bytes($this->used_capacity)->format(),
|
||||
];
|
||||
}
|
||||
@@ -194,9 +195,12 @@ class User extends Authenticatable
|
||||
*/
|
||||
public function getFolderTreeAttribute()
|
||||
{
|
||||
// Get sorting setup
|
||||
|
||||
return FileManagerFolder::with(['folders.shared', 'shared:token,id,item_id,permission,protected,expire_in'])
|
||||
->where('parent_id', 0)
|
||||
->where('user_id', $this->id)
|
||||
->sortable()
|
||||
->get();
|
||||
}
|
||||
|
||||
@@ -252,6 +256,46 @@ class User extends Authenticatable
|
||||
$this->notify(new ResetPassword($token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Record user upload filesize
|
||||
*
|
||||
* @param $file_size
|
||||
*/
|
||||
public function record_upload($file_size)
|
||||
{
|
||||
$now = Carbon::now();
|
||||
|
||||
$record = Traffic::whereYear('created_at', '=', $now->year)
|
||||
->whereMonth('created_at', '=', $now->month)
|
||||
->firstOrCreate([
|
||||
'user_id' => $this->id,
|
||||
]);
|
||||
|
||||
$record->update([
|
||||
'upload' => $record->upload + $file_size
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Record user download filesize
|
||||
*
|
||||
* @param $file_size
|
||||
*/
|
||||
public function record_download($file_size)
|
||||
{
|
||||
$now = Carbon::now();
|
||||
|
||||
$record = Traffic::whereYear('created_at', '=', $now->year)
|
||||
->whereMonth('created_at', '=', $now->month)
|
||||
->firstOrCreate([
|
||||
'user_id' => $this->id,
|
||||
]);
|
||||
|
||||
$record->update([
|
||||
'download' => $record->download + $file_size
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user favourites folder
|
||||
*
|
||||
@@ -269,7 +313,7 @@ class User extends Authenticatable
|
||||
*/
|
||||
public function latest_uploads()
|
||||
{
|
||||
return $this->hasMany(FileManagerFile::class)->with(['parent'])->orderBy('created_at', 'DESC')->take(40);
|
||||
return $this->hasMany(FileManagerFile::class)->with(['parent'])->take(40);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
27
app/Zip.php
Normal file
27
app/Zip.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Zip extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
/**
|
||||
* Generate uuid
|
||||
*/
|
||||
protected static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::creating(function ($model) {
|
||||
$model->id = (string)Str::uuid();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
"laravel/ui": "^2.0",
|
||||
"league/flysystem-aws-s3-v3": "^1.0",
|
||||
"league/flysystem-cached-adapter": "^1.0",
|
||||
"madnest/madzipper": "^1.1",
|
||||
"teamtnt/laravel-scout-tntsearch-driver": "^8.3"
|
||||
},
|
||||
"require-dev": {
|
||||
|
||||
59
composer.lock
generated
59
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "aadbe31a952d26aab5730369e2bf4089",
|
||||
"content-hash": "2753a719196cd76d1bd7ee346540266c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
@@ -2778,6 +2778,62 @@
|
||||
],
|
||||
"time": "2020-07-01T11:33:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "madnest/madzipper",
|
||||
"version": "v1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/madnest/madzipper.git",
|
||||
"reference": "fd1d8199d04eac103eed9355c9bba680dcf8b89b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/madnest/madzipper/zipball/fd1d8199d04eac103eed9355c9bba680dcf8b89b",
|
||||
"reference": "fd1d8199d04eac103eed9355c9bba680dcf8b89b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-zip": "*",
|
||||
"illuminate/filesystem": "^6.18|^7.0|^8.0",
|
||||
"illuminate/support": "^6.18|^7.0|^8.0",
|
||||
"php": ">=7.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.3",
|
||||
"orchestra/testbench": "^5.1",
|
||||
"phpunit/phpunit": "^8.0|^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Madnest\\Madzipper\\MadzipperServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Madzipper": "Madnest\\Madzipper\\Madzipper"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Madnest\\Madzipper\\": "src/Madnest/Madzipper"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jakub Theimer",
|
||||
"email": "theimer@madne.st",
|
||||
"homepage": "https://madne.st",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Wannabe successor of Chumper/Zipper package for Laravel",
|
||||
"time": "2020-12-01T23:44:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "moneyphp/money",
|
||||
"version": "v3.3.1",
|
||||
@@ -7809,6 +7865,7 @@
|
||||
"faker",
|
||||
"fixtures"
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2019-12-12T13:22:17+00:00"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -165,6 +165,7 @@ return [
|
||||
TeamTNT\Scout\TNTSearchScoutServiceProvider::class,
|
||||
Intervention\Image\ImageServiceProvider::class,
|
||||
Laravel\Passport\PassportServiceProvider::class,
|
||||
Madnest\Madzipper\MadzipperServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Package Service Providers...
|
||||
@@ -232,6 +233,7 @@ return [
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
'Stripe' => Cartalyst\Stripe\Laravel\Facades\Stripe::class,
|
||||
'Crawler' => Jaybizzle\LaravelCrawlerDetect\Facades\LaravelCrawlerDetect::class,
|
||||
'Madzipper' => Madnest\Madzipper\Madzipper::class,
|
||||
],
|
||||
|
||||
'deploy_secret' => env('APP_DEPLOY_SECRET'),
|
||||
|
||||
@@ -41,7 +41,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'queue' => env('SCOUT_QUEUE', false),
|
||||
'queue' => env('SCOUT_QUEUE', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
return [
|
||||
|
||||
'version' => '1.7.10',
|
||||
'version' => '1.8',
|
||||
|
||||
// Define size of chunk uploaded by MB. E.g. integer 128 means chunk size will be 128MB.
|
||||
'chunk_size' => env('CHUNK_SIZE', '128'),
|
||||
];
|
||||
];
|
||||
|
||||
20
database/factories/FileFactory.php
Normal file
20
database/factories/FileFactory.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use App\FileManagerFile;
|
||||
use Faker\Generator as Faker;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
$factory->define(FileManagerFile::class, function (Faker $faker) {
|
||||
return [
|
||||
'unique_id' => $faker->randomDigit,
|
||||
'user_id' => 0,
|
||||
'folder_id' => 0,
|
||||
'name' => $faker->firstName,
|
||||
'basename' => $faker->lastName,
|
||||
'user_scope' => 'master',
|
||||
'updated_at' => Carbon::now(),
|
||||
'created_at' => Carbon::now()
|
||||
];
|
||||
});
|
||||
17
database/factories/FolderFactory.php
Normal file
17
database/factories/FolderFactory.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use App\FileManagerFolder;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(FileManagerFolder::class, function (Faker $faker) {
|
||||
return [
|
||||
'id' => $faker->randomDigit,
|
||||
'unique_id' => $faker->randomDigit,
|
||||
'user_id' => 1,
|
||||
'parent_id' => 0,
|
||||
'name' => $faker->sentence,
|
||||
'type' => 'folder',
|
||||
];
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddExifDataToFileManagerFilesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('file_manager_files', function (Blueprint $table) {
|
||||
$table->longText('metadata')->after('type')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('file_manager_files', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTrafficTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('traffic', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->bigInteger('user_id');
|
||||
$table->bigInteger('upload')->default(0);
|
||||
$table->bigInteger('download')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('traffic');
|
||||
}
|
||||
}
|
||||
36
database/migrations/2020_12_05_090531_create_jobs_table.php
Normal file
36
database/migrations/2020_12_05_090531_create_jobs_table.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
}
|
||||
34
database/migrations/2020_12_13_155309_create_zips_table.php
Normal file
34
database/migrations/2020_12_13_155309_create_zips_table.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateZipsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('zips', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->bigInteger('user_id');
|
||||
$table->string('shared_token')->nullable();
|
||||
$table->text('basename');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('zips');
|
||||
}
|
||||
}
|
||||
70
env.testing
Normal file
70
env.testing
Normal file
@@ -0,0 +1,70 @@
|
||||
APP_NAME=vueFileManager
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:v+s0R2C5q8jYySj3uwrKA8KH8c9JBIZTdXqB2ytk4j8=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_DEMO=false
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
DB_HOST=null
|
||||
DB_PORT=null
|
||||
DB_DATABASE=database/database.sqlite
|
||||
DB_USERNAME=null
|
||||
DB_PASSWORD=null
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=sty
|
||||
MAIL_PORT=3254
|
||||
MAIL_USERNAME=Milos
|
||||
MAIL_PASSWORD=milos123
|
||||
MAIL_ENCRYPTION=tls
|
||||
MAIL_FROM_ADDRESS="${MAIL_USERNAME}"
|
||||
MAIL_FROM_NAME="${MAIL_USERNAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=
|
||||
AWS_BUCKET=
|
||||
|
||||
DO_SPACES_KEY=
|
||||
DO_SPACES_SECRET=
|
||||
DO_SPACES_ENDPOINT=
|
||||
DO_SPACES_REGION=
|
||||
DO_SPACES_BUCKET=
|
||||
|
||||
WASABI_KEY=
|
||||
WASABI_SECRET=
|
||||
WASABI_ENDPOINT=
|
||||
WASABI_REGION=
|
||||
WASABI_BUCKET=
|
||||
|
||||
BACKBLAZE_KEY=
|
||||
BACKBLAZE_SECRET=
|
||||
BACKBLAZE_ENDPOINT=
|
||||
BACKBLAZE_REGION=
|
||||
BACKBLAZE_BUCKET=
|
||||
|
||||
PASSPORT_CLIENT_ID=1
|
||||
PASSPORT_CLIENT_SECRET=TqSdKJUbCbC7g5To3Clriw9BMblef0nIdEaI81Q5
|
||||
|
||||
APP_DEPLOY_SECRET=
|
||||
|
||||
CASHIER_LOGGER=stack
|
||||
CASHIER_CURRENCY=
|
||||
STRIPE_KEY=
|
||||
STRIPE_SECRET=
|
||||
STRIPE_WEBHOOK_SECRET=
|
||||
CASHIER_PAYMENT_NOTIFICATION=App\Notifications\ConfirmPayment
|
||||
@@ -24,7 +24,7 @@
|
||||
"lodash": "^4.17.20",
|
||||
"node-sass": "^4.14.1",
|
||||
"vee-validate": "^3.3.9",
|
||||
"vue": "^2.6.10",
|
||||
"vue": "^2.6.11",
|
||||
"vue-feather-icons": "^5.1.0",
|
||||
"vue-i18n": "^8.21.0",
|
||||
"vue-router": "^3.4.3",
|
||||
|
||||
12
public/assets/icons/alphabet.svg
Normal file
12
public/assets/icons/alphabet.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg width="13px" height="15px" viewBox="0 0 13 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="VueFileManager" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g id="Storage-Alert-Copy" transform="translate(-888.000000, -238.000000)" stroke="#000000" stroke-width="1.6">
|
||||
<g id="Sorting-Menu" transform="translate(865.000000, 67.000000)">
|
||||
<g id="alphabet-icon" transform="translate(24.000000, 172.000000)">
|
||||
<polyline id="Path" points="11.1999993 13.1999991 5.59999967 0.199999094 0 13.1999991 5.59999967 0.199999094"></polyline>
|
||||
<line x1="2.25" y1="8" x2="8.75" y2="8" id="Line-2"></line>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 854 B |
2
public/chunks/admin-account.js
vendored
2
public/chunks/admin-account.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/admin.js
vendored
2
public/chunks/admin.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-appearance.js
vendored
2
public/chunks/app-appearance.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-billings.js
vendored
2
public/chunks/app-billings.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-email.js
vendored
2
public/chunks/app-email.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-index.js
vendored
2
public/chunks/app-index.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-others.js
vendored
2
public/chunks/app-others.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-payments.js
vendored
2
public/chunks/app-payments.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-settings.js
vendored
2
public/chunks/app-settings.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/app-setup.js
vendored
2
public/chunks/app-setup.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/billings-detail.js
vendored
2
public/chunks/billings-detail.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/contact-us.js
vendored
2
public/chunks/contact-us.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/create-new-password.js
vendored
2
public/chunks/create-new-password.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/dashboard.js
vendored
2
public/chunks/dashboard.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/database.js
vendored
2
public/chunks/database.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/dynamic-page.js
vendored
2
public/chunks/dynamic-page.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/environment-setup.js
vendored
2
public/chunks/environment-setup.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/files.js
vendored
2
public/chunks/files.js
vendored
File diff suppressed because one or more lines are too long
1
public/chunks/files~chunks/shared-files~chunks/shared-page.js
vendored
Normal file
1
public/chunks/files~chunks/shared-files~chunks/shared-page.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/chunks/forgotten-password.js
vendored
2
public/chunks/forgotten-password.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/installation-disclaimer.js
vendored
2
public/chunks/installation-disclaimer.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/invoices.js
vendored
2
public/chunks/invoices.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/landing-page.js
vendored
2
public/chunks/landing-page.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/not-found-shared.js
vendored
2
public/chunks/not-found-shared.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/page-edit.js
vendored
2
public/chunks/page-edit.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/pages.js
vendored
2
public/chunks/pages.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/plan-create.js
vendored
2
public/chunks/plan-create.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/plan-delete.js
vendored
2
public/chunks/plan-delete.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/plan-settings.js
vendored
2
public/chunks/plan-settings.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/plan-subscribers.js
vendored
2
public/chunks/plan-subscribers.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/plan.js
vendored
2
public/chunks/plan.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/plans.js
vendored
2
public/chunks/plans.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/profile.js
vendored
2
public/chunks/profile.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/purchase-code.js
vendored
2
public/chunks/purchase-code.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/chunks/settings-invoices.js
vendored
2
public/chunks/settings-invoices.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/settings-password.js
vendored
2
public/chunks/settings-password.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/settings-payment-methods.js
vendored
2
public/chunks/settings-payment-methods.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/settings-storage.js
vendored
2
public/chunks/settings-storage.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/settings-subscription.js
vendored
2
public/chunks/settings-subscription.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/settings.js
vendored
2
public/chunks/settings.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/shared-files.js
vendored
2
public/chunks/shared-files.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/shared-page.js
vendored
2
public/chunks/shared-page.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/sign-in.js
vendored
2
public/chunks/sign-in.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/sign-up.js
vendored
2
public/chunks/sign-up.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/stripe-credentials.js
vendored
2
public/chunks/stripe-credentials.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/subscription-plans.js
vendored
2
public/chunks/subscription-plans.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/subscription-service.js
vendored
2
public/chunks/subscription-service.js
vendored
File diff suppressed because one or more lines are too long
6
public/chunks/trash.js
vendored
6
public/chunks/trash.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/upgrade-billing.js
vendored
2
public/chunks/upgrade-billing.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/upgrade-plan.js
vendored
2
public/chunks/upgrade-plan.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/upgrade.js
vendored
2
public/chunks/upgrade.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/user-create.js
vendored
2
public/chunks/user-create.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/user-delete.js
vendored
2
public/chunks/user-delete.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/user-detail.js
vendored
2
public/chunks/user-detail.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/user-invoices.js
vendored
2
public/chunks/user-invoices.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/user-password.js
vendored
2
public/chunks/user-password.js
vendored
File diff suppressed because one or more lines are too long
2
public/chunks/user-storage.js
vendored
2
public/chunks/user-storage.js
vendored
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user