File tree 1 file changed +0
-9
lines changed
1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -52,18 +52,13 @@ in `config/fileapi.php`
52
52
53
53
### Initialize File API
54
54
55
- ```php
56
55
use \Unisharp\FileApi\FileApi;
57
-
58
56
$fa = new FileApi();
59
- ```
60
57
61
58
or
62
59
63
- ```php
64
60
$fa = new FileApi('/images/event/'); # initialize it by giving a base path
65
61
$fa_article = new FileApi('/images/article/'); # initiate another instance
66
- ```
67
62
68
63
69
64
### Save to Storage By Giving Uploaded File
104
99
105
100
### Get file fullpath (abstract path from Laravel Storage)
106
101
107
- ```php
108
102
$fa->getPath('wfj412.jpg'); // => '/images/event/wfj412.jpg'
109
- ```
110
103
111
104
### Parse File Path to URL
112
105
if you store your file into cloud storage and you want to get url cloud site,
113
106
you can use url() method to get it
114
107
115
- ``` php
116
108
echo $fa->getUrl('wfjsdf.jpg'); // => "https://s3-ap-northeast-1.amazonaws.com/xxx/xxx/55c1e027caa62L.png"
117
- ```
118
109
119
110
### Work with Laravel Storage
120
111
You can’t perform that action at this time.
0 commit comments