Search code examples
laravelfile-uploadmultipartform-datapodio

Connection to Podio API failed: [92] when uploading files


Connected the podio file upload to attach images to item. Started getting the "Connection to Podio API failed: [92]" error. Before everything worked fine. Is it a problem on my side or on Podio's side?


Solution

  • Podio does not define CURLOPT_HTTP_VERSION variable in it's curl requests and therefore leaving the decision to curl client to decide.

    in your case I guess cURL chooses HTTP2 version for unknown reasons ( might be due to SSL implementation ) and according to my experience with Podio, PodioFile::upload breaks when HTTP2 is used.

    To solve the issue you would need to force Podio to use HTTP1.1 , This should fix your issue :

    1. inside lib/Podio.php look for curl_setopt(self::$ch,CURLOPT_RETURNTRANSFER, true);
    2. just beneath it add curl_setopt(self::$ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

    Tip: do consider upgrading to the latest version of the package podio-community/podio-php before modifying the code and Good luck.