phpflickr
phpflickr copied to clipboard
replace method doesn't use replace url
$flickr->uploader()->replace('/path/to/photo.jpg', 44333812150);
Should probably go to
/** @var string */
protected $replaceEndpoint = 'https://up.flickr.com/services/replace/';
Instead, it goes to the upload endpoint
/** @var string */
protected $uploadEndpoint = 'https://up.flickr.com/services/upload/';
I think the easiest solution is to add the endpoint to the sendFile call, or to pass a boolean $replace and select the endpoint in sendFile()
public function replace($photoFilename, $photoId, $async = null)
{
return $this->sendFile($photoFilename, ['photo_id' => $photoId, 'async' => $async]);
}
WDYT?
I think passing $replace to sendFile() sounds sensible. That endpoint isn't needed for anything else is it?
no, i haven't seen it in use elsewhere.