Skip to content

Commit 238107f

Browse files
committed
put, del, head, copy - working
1 parent a708cfe commit 238107f

10 files changed

+843
-12
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.vercel
22
/vendor
3-
.idea
3+
.idea/*

api/index.php

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
<?php
22

3+
use VercelBlobPhp\Client;
4+
35
require __DIR__ . '/../vendor/autoload.php';
46

5-
echo "Vercel Blob PHP";
7+
$client = new Client();
8+
9+
if (!empty($_GET['test-put'])) {
10+
$result = $client->put('this-is-test.txt', 'Testing');
11+
12+
echo "<pre>";
13+
echo var_export($result, true);
14+
echo "</pre>";
15+
}
16+
17+
if (!empty($_GET['test-head'])) {
18+
$result = $client->head($_GET['test-head']);
19+
20+
echo "<pre>";
21+
echo var_export($result, true);
22+
echo "</pre>";
23+
}
24+
25+
if (!empty($_GET['test-delete'])) {
26+
$client->del([$_GET['test-delete']]);
27+
}
28+
29+
echo "Vercel Blob Client PHP";

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^8.2"
16+
"php": "^8.2",
17+
"guzzlehttp/guzzle": "^7.8"
1718
}
1819
}

0 commit comments

Comments
 (0)