Download the PHP package vadiasov/upload without Composer
On this page you can find all versions of the php package vadiasov/upload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vadiasov/upload
More information about vadiasov/upload
Files in vadiasov/upload
Package upload
Short Description Laravel package to multi upload files with 'drug and drop' using dropzone.js
License MIT
Informations about the package upload
vadiasov/upload
PHP configuration
PHP must be able to upload your files. That means that upload_max_filesize and post_max_size must be equal to appropriate value.
For example:
Find php.ini. Insert in the working file:
Open this file in any browser. See where is your php.ini. Open it in terminal. For example (Ubuntu 16.04):
Find upload_max_filesize and post_max_size and change their values. For example:
Then you need to restart PHP. For example:
After that check phpinfo() again to be sure that PHP got new values.
Preparation
You need to have a directory to upload files. Decide first where do you want to place uploaded files. As rule it's some subdirectory in storage/app/public.
When you have decided about subdirectory:
- write it in a config (see next section)
- create it in a real file system
- get appropriate access (777) to it.
Installation
- Create row in the application root composer:
2.Run in your terminal:
3.This package is developed with discovery feature. So it must itself to create row in a config/app.com about ServiceProvider:4.Publish Assets. dropzone.js and dropzone.css will be copied from the package to public/js and css directories accordingly. 5.Edit config file that you will use in outer controller to start upload (for example: config/upload-admin.php): 5.1.For a single parent:
5.1.For a two-parents case: `- where url - package route of package controller function that process files
- acceptedFiles - mime rules for uploading files
- maxFilesize - maximum file size that is accepted
- path - path to directory of uploaded files
- db_table - DB table name where you save file names of uploaded files
- column - table column name that keep file names of uploaded files
- id_item - table column name that you can use to bind uploaded file to. For example, "album_id" of album that has this file (track).
- backUrl - route name for a button "Back" under the form of uploading (you uploaded all files and click it to come back to somewhere).
- header - String that may be inserted in the Upload form header (with title of an album).
- parent_table - DB table name of parent packages. For example may be used to get a title of album.
- parent_column_name - DB table column name of parent packages. For example may be used to get a title of album.
Using
Open page with route for a single parent:
Open page with route for a two-parents case:
to open upload form.
Where
- config - name of config file (see p.4 - upload-admin)
- id - parameter that you can use (for examle: id of album that has to include uploading tracks).
Example:
- first parent - Album
- second parent - tracks we upload arts for a specific track of an album.