diff --git a/phpFlickr.php b/phpFlickr.php index 975371e..ac7bfd4 100644 --- a/phpFlickr.php +++ b/phpFlickr.php @@ -427,7 +427,7 @@ function sync_upload ($photo, $title = null, $description = null, $tags = null, } $photo = realpath($photo); - $args['photo'] = '@' . $photo; + $args['photo'] = new CurlFile($photo, mime_content_type($photo), $photo); $curl = curl_init($this->upload_endpoint); @@ -489,7 +489,7 @@ function async_upload ($photo, $title = null, $description = null, $tags = null, } $photo = realpath($photo); - $args['photo'] = '@' . $photo; + $args['photo'] = new CurlFile($photo, mime_content_type($photo), $photo); $curl = curl_init($this->upload_endpoint); @@ -550,7 +550,7 @@ function replace ($photo, $photo_id, $async = null) { } $photo = realpath($photo); - $args['photo'] = '@' . $photo; + $args['photo'] = new CurlFile($photo, mime_content_type($photo), $photo); $curl = curl_init($this->replace_endpoint);