Skip to content

Commit 9f1f09d

Browse files
committed
delivery via http
1 parent 6907be8 commit 9f1f09d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $uri = Storage::store($file, new OpenstackStorage)
6868

6969
#### Retrieve a file
7070

71-
We've store a file, now we want to retrieve it from the storage mechanism.
71+
We stored a file, now we want to retrieve it from the storage mechanism.
7272

7373
For this, we will use the `fileDescriptor()` method declared on `StorageInterface`, and wich is implemented by each storage driver.
7474

@@ -85,3 +85,19 @@ $contents = $descriptor->contents();
8585
$mime = $descriptor->mime();
8686

8787
````
88+
89+
#### Delivering a file though http
90+
91+
To get an http url for accessing a file, you may use an implementation of `DeliveryInterface`.
92+
93+
Until now, there is an implementation for file stored with `FilesystemStorage` driver.
94+
95+
````php
96+
use Softservlet\FileManager\Deliver\LocalHttpDelivery;
97+
98+
$file = new GenericFile($uri);
99+
100+
$delivery = new LocalHttpDelivery();
101+
102+
$url = $delivery->httpUrl($file);
103+
````

0 commit comments

Comments
 (0)