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

Podio file upload giving error #154

Open
loogitak opened this issue Mar 8, 2019 · 7 comments
Open

Podio file upload giving error #154

loogitak opened this issue Mar 8, 2019 · 7 comments

Comments

@loogitak
Copy link

loogitak commented Mar 8, 2019

I have 2 servers one is .in while other is .com. On uploading the png file on .in runs perfectly but not on another. What could be the reason? Below is the error I am getting.

Uncaught PodioConnectionError: Connection to Podio API failed: [92]

While on this same server .com I am able to get other API calls such as get items in-app, get Items. Only on file uploading, I am getting this error.

Then I even tried using curl API as given in api doc.

`$k=file_get_contents('files/download.jpg');
$str=array("source"=>$k,"filename"=>"download.jpg");
$data=json_encode($str,JSON_PRETTY_PRINT);
//echo $k;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.podio.com/file?oauth_token=b21ee70692094c3b97r4tr8t5fjdjerre");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS,"source=".$k."&filename=download.jpg");
//curl_setopt($ch, CURLOPT_POSTFIELDS,'{"source":'.$k.',"filename":"test.jpg"}');
$headers= array();
$headers[]= 'Content-Type: multipart/form-data';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);
$r = json_decode ($response,true);
print_r($r);`

Error

{ "error_parameters": {}, "error_detail": null, "error_propagate": false, "request": { "url": "http://api.podio.com/file", "query_string": "oauth_token=b21ee70692094c3b97r4tr8t5fjdjerre", "method": "POST" }, "error_description": "An unexpected error occured during execution", "error": "unexpected" }

But not succeeded. Any help will be much appreciated.

@rafaelmb
Copy link
Member

This does not look like an lib related issue you should try to contact podio support directly.

@talhaghaffar92
Copy link

Hello did you found out solution? i am facing same problem
Screen Shot 2019-03-26 at 2 06 21 AM

@jeff-goodman
Copy link

jeff-goodman commented Mar 25, 2019 via email

@bajarang-agarwal
Copy link
Contributor

@talhaghaffar92 Can you please share some code snippet which is giving the error?

@Lennix
Copy link

Lennix commented Jun 21, 2019

I'm having the same issue during upload. According to cURL its: curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
I've changed podio-php to force use of HTTP1.1 and it works.

I've done some research and it seems most likely that the problem lies on podio's end.

BTW I'm running php 7.3.6 with cURL 7.64.0.

@irzhywau
Copy link

irzhywau commented Mar 2, 2020

Is there another way to apply this changes without tweaking the library? like options or something similar

@Khatibmo
Copy link

Khatibmo commented May 6, 2020

I'm having the same issue during upload. According to cURL its: curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
I've changed podio-php to force use of HTTP1.1 and it works.

I've done some research and it seems most likely that the problem lies on podio's end.

BTW I'm running php 7.3.6 with cURL 7.64.0.

How did you manage to force HTTP1.1 in podio ?

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

8 participants