@@ -52,9 +52,7 @@ $client = new Client(
52
52
password: getenv("OPTIONAL_IMAGEKIT_IGNORES_THIS") ?: "do_not_set",
53
53
);
54
54
55
- $response = $client->files->upload(
56
- file: "https://www.example.com/public-url.jpg", fileName: "file-name.jpg"
57
- );
55
+ $response = $client->files->upload(file: 'file', fileName: "file-name.jpg");
58
56
59
57
var_dump($response->videoCodec);
60
58
```
@@ -76,9 +74,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
76
74
use ImageKit\Core\Exceptions\APIConnectionException;
77
75
78
76
try {
79
- $response = $client->files->upload(
80
- file: "https://www.example.com/public-url.jpg", fileName: "file-name.jpg"
81
- );
77
+ $response = $client->files->upload(file: 'file', fileName: "file-name.jpg");
82
78
} catch (APIConnectionException $e) {
83
79
echo "The server could not be reached", PHP_EOL;
84
80
var_dump($e->getPrevious());
@@ -126,7 +122,7 @@ $client = new Client(maxRetries: 0);
126
122
// Or, configure per-request:
127
123
128
124
$result = $client->files->upload(
129
- file: "https://www.example.com/public-url.jpg" ,
125
+ file: 'file' ,
130
126
fileName: "file-name.jpg",
131
127
requestOptions: RequestOptions::with(maxRetries: 5),
132
128
);
@@ -148,7 +144,7 @@ Note: the `extra*` parameters of the same name overrides the documented paramete
148
144
use ImageKit\RequestOptions;
149
145
150
146
$response = $client->files->upload(
151
- file: "https://www.example.com/public-url.jpg" ,
147
+ file: 'file' ,
152
148
fileName: "file-name.jpg",
153
149
requestOptions: RequestOptions::with(
154
150
extraQueryParams: ["my_query_parameter" => "value"],
0 commit comments