I didnt understand how to upload an image

codebird
php

#1

I’m trying to upload an image but i see that the example code sugests:

// these files to upload. You can also just upload 1 image!
$media_files = [
  'bird1.jpg', 'bird2.jpg', 'bird3.jpg'
];
// will hold the uploaded IDs
$media_ids = [];

foreach ($media_files as $file) {
  // upload all media files
  $reply = $cb->media_upload([
    'media' => $file
  ]);
  // and collect their IDs
  $media_ids[] = $reply->media_id_string;
}

Where should this ‘bird1.jpg’, ‘bird2.jpg’, ‘bird3.jpg’ be located?
I’m trying to upload but i tried to pass and image and i receive Request error for API call: Operation timed out after 10000 milliseconds with 0 bytes received.

I tried to upload just a simple tweet and didnt have any problem, thanks!