Skip to content

Podio file upload giving error #154

@loogitak

Description

@loogitak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions