mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
chunk upload and multipart upload beta.2
This commit is contained in:
40
README.md
40
README.md
@@ -25,8 +25,8 @@ But, it can't be done without you, development is more and more complicated and
|
||||
- [Get your active plans](#get-your-active-plans)
|
||||
- [Manage Failed Payments](#manage-failed-payments)
|
||||
- [Tax Rates](#tax-rates)
|
||||
- [Technical Informations](#technical-informations)
|
||||
- [For Developers](#for-developers)
|
||||
- [Developers](#developers)
|
||||
- [Running development environment on your localhost](#running-development-environment-on-your-localhost)
|
||||
- [Supported Storages](#supported-storages)
|
||||
- [How to Create New Language](#how-to-create-new-language)
|
||||
- [Others](#others)
|
||||
@@ -65,8 +65,15 @@ But, it can't be done without you, development is more and more complicated and
|
||||
|
||||
Copy project files to web root folder of your domain. It's mostly located in `html`, `www` or `public_html` folder name.
|
||||
|
||||
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.
|
||||
|
||||
Make sure `.env` file was uploaded. This type of file can be hidden in default.
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
Set `755` permission (CHMOD) to these file and folders directory within all children subdirectories:
|
||||
|
||||
- /bootstrap/cache
|
||||
@@ -83,17 +90,19 @@ That was the hardest part of installation proces. Please follow instructions in
|
||||
There are several PHP settings good to know to setup before you try upload any file. Please set these values in your php.ini, we provide minimal setup for you. When you set `-1` then you set infinity limits.
|
||||
|
||||
```
|
||||
memory_limit = 128M
|
||||
upload_max_filesize = 128
|
||||
post_max_size = 128M
|
||||
memory_limit = 512M
|
||||
upload_max_filesize = 1024M
|
||||
post_max_size = 1024M
|
||||
max_file_uploads = 50
|
||||
max_execution_time = 1800
|
||||
```
|
||||
|
||||
## Chunk 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.
|
||||
|
||||
|
||||
## Nginx Configuration
|
||||
If you running VueFileManager undex Nginx, don't forget set this value in your `nginx.conf` file:
|
||||
```
|
||||
@@ -201,11 +210,15 @@ You are able to manage tax rates. When adding a new tax rate, if no Region is sp
|
||||
|
||||
Just log in to your stripe dashboard, and you will find taxes under `Dashboard / Products / Tax Rates`.
|
||||
|
||||
# Technical Informations
|
||||
## For Developers
|
||||
Installation process on your localhost is the same. But, there are some good hints.
|
||||
# Developers
|
||||
## Running development environment on your localhost
|
||||
|
||||
After successfully installation with setup wizard, you have to set your `APP_ENV` to local mode, in default, it's in production mode.
|
||||
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
|
||||
```
|
||||
|
||||
Set your `APP_ENV` to local mode, in default, it's in production mode.
|
||||
```
|
||||
APP_ENV=local
|
||||
```
|
||||
@@ -215,21 +228,22 @@ Also, to debug application, set `APP_DEBUG` on true:
|
||||
APP_DEBUG=true
|
||||
```
|
||||
|
||||
To start server on your localhost, run this command
|
||||
To start server on your localhost, run command below. Then go to your generated localhost URL by terminal, and follow Setup Wizard steps to configure VueFileManager.
|
||||
```
|
||||
php artisan serve
|
||||
```
|
||||
To develop your front-end, you have to install npm modules by this command:
|
||||
|
||||
To develop your Vue front-end, you have to install npm modules by this command:
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
To compiles and hot-reloads for development. Then run this command:
|
||||
To compiles and hot-reloads for front-end development. Then run this command:
|
||||
```
|
||||
npm run hot
|
||||
```
|
||||
|
||||
To compiles for production, run this command
|
||||
To compiles for production build, run this command
|
||||
```
|
||||
npm run prod
|
||||
```
|
||||
|
||||
@@ -314,7 +314,7 @@ class Editor
|
||||
if (!$file) continue;
|
||||
|
||||
// Get file size
|
||||
$filesize = $disk_local->size('file-manager/' . $filename);
|
||||
$filesize = $disk_local->size('file-manager/' . $file);
|
||||
|
||||
// If file is bigger than 5.2MB then run multipart upload
|
||||
if ($filesize > 5242880) {
|
||||
@@ -353,7 +353,7 @@ class Editor
|
||||
} else {
|
||||
|
||||
// Stream file object to s3
|
||||
Storage::putFileAs('/file-manager', storage_path() . '/app/file-manager/' . $file, $file, 'private');
|
||||
Storage::putFileAs('file-manager', storage_path() . '/app/file-manager/' . $file, $file, 'private');
|
||||
}
|
||||
|
||||
// Delete file after upload
|
||||
|
||||
2
public/js/main.js
vendored
2
public/js/main.js
vendored
File diff suppressed because one or more lines are too long
6
resources/js/helpers.js
vendored
6
resources/js/helpers.js
vendored
@@ -114,13 +114,13 @@ const Helpers = {
|
||||
// Set Data
|
||||
let formData = new FormData(),
|
||||
uploadedSize = 0,
|
||||
isNotGeneralError = true
|
||||
isNotGeneralError = true,
|
||||
filename = Array(16).fill(0).map(x => Math.random().toString(36).charAt(2)).join('') + '-' + file.name + '.part'
|
||||
|
||||
do {
|
||||
let isLast = chunks.length === 1,
|
||||
chunk = chunks.shift(),
|
||||
attempts = 0,
|
||||
filename = Array(16).fill(0).map(x => Math.random().toString(36).charAt(2)).join('') + '-' + file.name + '.part'
|
||||
attempts = 0
|
||||
|
||||
// Set form data
|
||||
formData.set('file', chunk, filename);
|
||||
|
||||
@@ -94,6 +94,10 @@
|
||||
this.$refs.verifyPurchaseCode.setErrors({
|
||||
'Purchase Code': ['Purchase code is invalid.']
|
||||
});
|
||||
} else if (error.response.status == 404) {
|
||||
this.$refs.verifyPurchaseCode.setErrors({
|
||||
'Purchase Code': ['You may have misconfigured the app, please read the readme file and try it again.']
|
||||
});
|
||||
} else {
|
||||
this.$refs.verifyPurchaseCode.setErrors({
|
||||
'Purchase Code': ['Something is wrong. Please try again.']
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
.error-message {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -25px;
|
||||
top: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user