v1.7.3 rc.1

This commit is contained in:
carodej
2020-07-30 08:47:05 +02:00
parent 46256f6332
commit cd0627e8b8
4 changed files with 57 additions and 10 deletions

View File

@@ -63,26 +63,34 @@ But, it can't be done without you, development is more and more complicated and
## Installation
#### 1. Upload files on your server
Copy project files to web root folder of your domain. It's mostly located in `html`, `www` or `public_html` folder name.
#### 2. Configure your web root folder
Configure your web server's document / web root to point to the public directory of the software. For example, if you've uploaded the software in `example.com` folder, your web directory should be changed to `example.com/public` folder.
#### 3. Check your .env file
Make sure `.env` file was uploaded. This type of file can be hidden in default.
#### 3.1 When you install from GitHub
When you download repository from GitHub, you have to rename your `.env.example` file to `.env`. Then run command below in your terminal to install vendors. Composer is required.
```
composer install
```
#### 4. Set write permissions
Set `755` permission (CHMOD) to these file and folders directory within all children subdirectories:
- /bootstrap/cache
- /storage
- /.env
#### 5. Open your application in your web browser
Then open your application in web browser. If everything works fine, you will be redirect to setup wizard installation process.
At first step you have to verify your purchase code. **Subscription service with stripe payments is available only for Extended License.**
At first step you have to verify your purchase code. **Subscription service with stripe payments is available only for Extended License.** If you can't verify your purchase code, check, if you did previously steps correctly.
#### 6. Follow setup wizard steps
That was the hardest part of installation proces. Please follow instructions in every step of Setup Wizard to successfully install VueFileManager.
@@ -91,16 +99,16 @@ There are several PHP settings good to know to setup before you try upload any f
```
memory_limit = 512M
upload_max_filesize = 1024M
post_max_size = 1024M
upload_max_filesize = 128M
post_max_size = 128M
max_file_uploads = 50
max_execution_time = 1800
max_execution_time = 3600
```
## Chunk Upload
## Chunk & Multipart Upload
VueFileManager in default supporting chunk upload. Default chunk upload size is `128MB`. If you wish change this default value, go to `/config/vuefilemanager.php` and change `chunk_size` attribute.
if you use external storage, and upload large files, to prevent failing upload process make sure you have enough space in your application space.
When you use external storage, and upload large files, to prevent failing upload process make sure you have enough space in your application space and set higher `max_execution_time` in your php.ini to move your files to external storage.
## Nginx Configuration

View File

@@ -10,6 +10,7 @@ use App\Http\Requests\FileFunctions\RenameItemRequest;
use App\User;
use Aws\Exception\MultipartUploadException;
use Aws\S3\MultipartUploader;
use Carbon\Carbon;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\File;
@@ -245,7 +246,7 @@ class Editor
self::check_directories(['chunks', 'file-manager']);
// File name
$user_file_name = basename('chunks/' . substr($file->getClientOriginalName(),17), '.part');
$user_file_name = basename('chunks/' . substr($file->getClientOriginalName(), 17), '.part');
$disk_file_name = basename('chunks/' . $file->getClientOriginalName(), '.part');
$temp_filename = $file->getClientOriginalName();
@@ -289,7 +290,12 @@ class Editor
];
// Move files to external storage
if (! is_storage_driver(['local'])) {
if (!is_storage_driver(['local'])) {
// Clear failed uploads if exists
self::clear_failed_files();
// Move file to external storage service
self::move_to_external_storage($disk_file_name, $thumbnail);
}
@@ -298,6 +304,38 @@ class Editor
}
}
/**
* Clear failed files
*/
private static function clear_failed_files()
{
$local_disk = Storage::disk('local');
// Get all files from storage
$files = collect([
$local_disk->allFiles('file-manager'),
$local_disk->allFiles('chunks')
])->collapse();
$files->each(function ($file) use ($local_disk) {
// Get the file's last modification time.
$last_modified = $local_disk->lastModified($file);
// Get diffInHours
$diff = Carbon::parse($last_modified)->diffInHours(Carbon::now());
// Delete if file is in local storage more than 24 hours
if ($diff > 24) {
Log::info('Failed file or chunk ' . $file . ' deleted.');
// Delete file from local storage
$local_disk->delete($file);
}
});
}
/**
* Move file to external storage if is set
*
@@ -374,7 +412,7 @@ class Editor
Storage::disk('local')->makeDirectory($directory);
}
if (! is_storage_driver(['local'])) {
if (!is_storage_driver(['local'])) {
if (!Storage::exists($directory)) {
Storage::makeDirectory($directory);
}

2
public/js/main.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -52,6 +52,7 @@
border-radius: 6px;
width: 40px;
height: 40px;
object-fit: cover;
}
&.large {