You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### If you are testing this package from a local server directory
35
35
@@ -155,9 +155,9 @@ Run command to create symbolic links:
155
155
156
156
**Pay Attention! This option is needed just in the next cases:**
157
157
158
-
- If you use a **File setter** in your app html forms (see **5.3 Digging deeper** point).
158
+
- If you use a **File setter** in your app html forms (see **5.3 Digging deeper**/ **5.3.3 Use FileSetter**point).
159
159
160
-
- If you use an **Album editor** (see **5.3 Digging deeper** point).
160
+
- If you use an **Album editor** (see in **5.1 Routes part**).
161
161
162
162
**Make sure** you use a **Bootstrap 4** for styling and **JQuery** in your application.
163
163
@@ -177,7 +177,7 @@ Set the next js asset at the end of the `body` tag of your app layout:
177
177
178
178
Note: `vendor/uploader/js/jquery.min.js` is required just if **JQuery** is absent in your application.
179
179
180
-
#### 4.2.2 If you use [AdminLTE](https://github.com/jeroennoten/Laravel-AdminLTE) package
180
+
#### 4.2.2 If you use [AdminLTE](https://github.com/jeroennoten/Laravel-AdminLTE) package in your project
181
181
182
182
```php
183
183
'plugins' => [
@@ -208,7 +208,7 @@ Pay attention: Not recommended using of `asset()` in AdminLTE config file, becau
208
208
209
209
### 4.3 Change `uploader.php` config file.
210
210
211
-
This file is **intuitive**. Some features of its configuration are described in the **5.3 Digging deeper** point.
211
+
This file is **intuitive**.
212
212
213
213
But at this stage, pay attention to the next important options:
214
214
@@ -397,15 +397,13 @@ The next routes are available by default:
397
397
398
398
#### 5.2.2 Access to File upload manager
399
399
400
-
If to click on green **Uploader** button in a file list manager, you will go to **uploader_file_upload_manager** route.
400
+
If to click on green **Uploader** button in a file list manager, you will go to **uploader_file_upload_manager** route: `http://example-domain.com/uploader/managers/file-upload`.
If to click on green edition button in a file list manager, you will go to **uploader_file_edit_manager** route.
407
-
408
-
Also you can use this route as in a simple example below:
406
+
If to click on green edition button in a file list manager, you will go to **uploader_file_edit_manager** route: `http://example-domain.com/uploader/managers/file-edit/{id}`:
409
407
410
408
```php
411
409
route('uploader_file_edit_manager', ['id' => 1])
@@ -426,9 +424,7 @@ If you have got a media file entry `$mediaFile` by `Itstructure\MFU\Models\Media
@@ -484,9 +480,69 @@ Image album edition page example looks like this:
484
480
485
481
See inside core.
486
482
487
-
#### 5.3.3 Link Media files with parent owner
483
+
#### 5.3.3 Use FileSetter
484
+
485
+
FileSetter is needed to set **file id** in to the form field and file **preview** to special container before sending request to controller during saving some entity: Page, Catalog, Product e.t.c.
If to click on **Set thumbnail** button, then file list manager will be opened, but with additional button "V":
538
+
539
+

540
+
541
+
This button is to choose a concrete file and insert it's preview in to the `thumbnail_container` and it's ID in to the automatically rendered form field by `attribute` option.
542
+
543
+
See next point **5.3.4** to understand how this selected file can be linked with a parent owner, like for example: Page, Product e.t.c...
544
+
545
+
#### 5.3.4 Link media files with parent owner
490
546
491
547
For example you use `Product` eloquent model, which contains **albums** and **media files** both.
492
548
@@ -571,15 +627,23 @@ The main rules:
571
627
572
628
- It is very important to add method `booted()` with behaviour instances.
573
629
574
-
- It is very important to set **behavior attributes**!
630
+
- It is very important to set `getBehaviorAttributes()` with attributes list, which are used in a blade form for **FileSetter**!
575
631
576
632
See deeper in to core and imagine how it works :-)
577
633
578
634
Go next...
579
635
580
-
It is very important to use MFU partials correctly in your application blade forms!
636
+
It is very important to use MFU blade partials correctly in your application blade forms!
0 commit comments