@@ -52,9 +52,7 @@ $client = new Client(
5252 password: getenv("OPTIONAL_IMAGEKIT_IGNORES_THIS") ?: "do_not_set",
5353);
5454
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");
5856
5957var_dump($response->videoCodec);
6058```
@@ -76,9 +74,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
7674use ImageKit\Core\Exceptions\APIConnectionException;
7775
7876try {
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");
8278} catch (APIConnectionException $e) {
8379 echo "The server could not be reached", PHP_EOL;
8480 var_dump($e->getPrevious());
@@ -126,7 +122,7 @@ $client = new Client(maxRetries: 0);
126122// Or, configure per-request:
127123
128124$result = $client->files->upload(
129- file: "https://www.example.com/public-url.jpg" ,
125+ file: 'file' ,
130126 fileName: "file-name.jpg",
131127 requestOptions: RequestOptions::with(maxRetries: 5),
132128);
@@ -148,7 +144,7 @@ Note: the `extra*` parameters of the same name overrides the documented paramete
148144use ImageKit\RequestOptions;
149145
150146$response = $client->files->upload(
151- file: "https://www.example.com/public-url.jpg" ,
147+ file: 'file' ,
152148 fileName: "file-name.jpg",
153149 requestOptions: RequestOptions::with(
154150 extraQueryParams: ["my_query_parameter" => "value"],
0 commit comments