Skip to content

Commit 9fb3805

Browse files
authored
Update README.md
Explain parameters in detail.
1 parent 80306a7 commit 9fb3805

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A PHP base class that you can use to upload any file into the server. It is a ve
44

55
----
66

7-
Composer installation:
7+
## Composer installation:
88

99
```composer
1010
composer require learncodeweb/upload-files-with-image-thumb-and-resizer
@@ -26,9 +26,32 @@ A PHP base class that you can use to upload any file into the server. It is a ve
2626
10) Files Extension Filters.
2727
11) File Size Limit for Uploading.
2828

29+
30+
## All parameters that you need to set in constructor
31+
32+
| Parameters | Default Value | Description |
33+
|----------------------|-------------------|---------------|
34+
| Response format | array | You can set to json or array |
35+
| Allow extensions | Not set | You can set the file extensions in array |
36+
| Dir path | false | Folder name where you need to save images [‘../Upload/’]. If you set the thumbs size array, the thumb folder will be created and thumb files move there |
37+
| Dir permission | 0655 | You can set the permission of newly created Dir. |
38+
39+
## All parameters that you need to set in method
40+
41+
| Parameters | Default Value | Description |
42+
|-----------------------|-------------------|------------------|
43+
| Input index name | User set | You can set your input="file" name index. |
44+
| Check minimum with | 400 | Default min with is 400, you can change with any number. |
45+
| Watermark | empty | You can set watermark array see the below details. |
46+
| Re-name | empty | Rename uploaded file if you need it. Left empty save files default name. |
47+
| Image Quality | 100 | Image quality in percent 1-100. Apply only for images (jpg,jpeg,png,gif). |
48+
| New Width | empty | If you want to resize the image then pass int value else upload without resizing the image will be saved. |
49+
| Thumb Widths | empty | If you want to create multiple thumbs than pass int value with array [350,450]. |
50+
51+
2952
----
3053

31-
How to use after installation:
54+
## How to use after installation:
3255

3356
```php
3457
require('../multi-files-upload-and-image-resizer.php');
@@ -39,7 +62,7 @@ $upload->uploadFiles('files', 250, '', $rename, 100, '850', ['350','450']);
3962

4063
>For watermark you will use array and able to add image as a watermark or text.
4164
42-
**With text below will be the parameters:**
65+
## With text below will be the parameters:
4366
```php
4467
[
4568
'value' => "HI I AM ZAID",
@@ -51,7 +74,7 @@ $upload->uploadFiles('files', 250, '', $rename, 100, '850', ['350','450']);
5174
];
5275
```
5376

54-
**With image below will be the parameters:**
77+
## With image below will be the parameters:
5578
```php
5679
[
5780
'value' => "your-image-complete-path",
@@ -60,7 +83,7 @@ $upload->uploadFiles('files', 250, '', $rename, 100, '850', ['350','450']);
6083
];
6184
```
6285

63-
**And the response will be get like below:**
86+
## And the response will be get like below:
6487

6588
In the below response you will get the uploaded/not uploaded/bad extensions and success/error flags array or json data.
6689

0 commit comments

Comments
 (0)