Skip to content

Commit

Permalink
updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dam-bal committed Apr 16, 2024
1 parent b16372e commit c8c1cc2
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,47 @@

PHP Client for Vercel Blob Storage.

[Vercel Blob](https://vercel.com/docs/storage/vercel-blob)
[Vercel Blob](https://vercel.com/docs/storage/vercel-blob)

## Usage

### Creating Client

```php
$client = new \VercelBlobPhp\Client();
```

### Using Client

#### PUT
```php
$result = $client->put(
'test.txt', // path
'hello world' // content,
new \VercelBlobPhp\CommonCreateBlobOptions(
addRandomSuffix: true, // optional
contentType: 'text', // optional
cacheControlMaxAge: 123, // optional
)
);

// $result is instance of PutBlobResult
$result->url
$result->downloadUrl
$result->pathname
$result->contentType
$result->contentDisposition
```

Third argument is optional.

#### DEL
```php
$client->del(['test.txt']);
```

#### COPY

#### HEAD

#### LIST

0 comments on commit c8c1cc2

Please sign in to comment.