elitedivision/amos-uploader
File Uploader for Amos
Requires
- php:>=5.4.0
- elitedivision/amos-core:*
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Extension for file upload, also of great size.
How do I get set up?
The preferred way to install this extension is through composer.
Either run
composer require elitedivision/amos-uploader
or add this row
"elitedivision/amos-uploader": "dev-master"
to the require section of your composer.json
file.
Add module configuration
Add module to your main config in backend like this:
<?php
'modules' => [
'uploader' => [
'class' => 'elitedivision\amos\uploader\Module',
'uploaderServer' => 'http://<host>:<port>/upload',
// eg. http://www.myhost.it:10000/upload
'allowedFileExtensions' => ['zip'], //optional - ['zip'] is default
],
],
Apply migrations
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-uploader/src/migrations
or add this row to your migrations config in console:
<?php
return [
'@vendor/elitedivision/amos-uploader/src/migrations',
];
Node Js configuration
There are 2 formidable scripts, one for http protocol and the other one for https protocol:
If you need to run formidable over http:
Configure port and serverUrl variables in /src/node/formidable.jsIf you need to run formidable over https:
Configure port, serverUrl, keys_dir and keys filenames variables in /src/node/formidable-ssl.js
On your host from your httpdocs folder:
- Install dependencies using commands:
npm install formidable express
Launch a node instance using command:
For formidable over http
`
bash node vendor/elitedivision/amos-uploader/src/node/formidable.js`
For formidable over https
`
bash node vendor/elitedivision/amos-uploader/src/node/formidable-https.js`