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

getthumb endpoint failing in php #34

Open
mijewe opened this issue Dec 16, 2024 · 0 comments
Open

getthumb endpoint failing in php #34

mijewe opened this issue Dec 16, 2024 · 0 comments

Comments

@mijewe
Copy link

mijewe commented Dec 16, 2024

Hi,

In Postman, I can use the getthumb endpoint no problem
https://eapi.pcloud.com/getthumb?fileid=xxx&size=500x500&crop=0&type=jpg

However in PHP, the getthumb endpoint fails because the Response Object doesn't have a 'results' property.

// my code
return $request->get("getthumb", [
    "fileid" => $fileId,
    "size" => "600x600",
    "crop" => 0
]);
// vendor/pcloud/pcloud-php-sdk/lib/Response.php
if ($this->response->result == 0) { <=== this is where it's failing
    return $this->parseResponse();
} else {

and returning the error

Attempt to read property "result" on string

I can't find a gethumb example in the PHP docs so I'm kind of shooting in the dark here. All I'm trying to do is show an <img> tag on a webpage of an image from my pCloud account - maybe there's a better way?

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

1 participant