Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace method doesn't use replace url #75

Open
tacman opened this issue Jul 22, 2024 · 2 comments
Open

replace method doesn't use replace url #75

tacman opened this issue Jul 22, 2024 · 2 comments

Comments

@tacman
Copy link
Contributor

tacman commented Jul 22, 2024

 $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?

@samwilson
Copy link
Owner

I think passing $replace to sendFile() sounds sensible. That endpoint isn't needed for anything else is it?

@tacman
Copy link
Contributor Author

tacman commented Nov 21, 2024

no, i haven't seen it in use elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants