
Anonymous Community User asked a question.
Cant access files uploaded via api
We actually want to upload a file and attach it to an item but we're having problems to just uploading it. We are having a problem uploading an image into an item. We cant seem to access the image we uploaded to Podio via the API. Like - https://files.podio.com/507952736 We get a - "Sorry, you don't have access to this file. You might want to ask your admin to provide you the access to this file." Which is so weird because everyone in our team cant access it, and we're admins on our workspaces. I also setup the api/secret keys and i'm and admin on that workspace. Whats wrong with this? This is the code: Podio::setup($client_id, $client_secret); try { Podio::authenticate_with_app($app_id, $app_token); $upload = PodioFile::upload('PATH_TO_FILE', 'test_image.jpg'); if( $upload != ""){ echo "<br><br>Image uploaded to podio!<br><br>"; echo "<pre>".$upload."</pre>"; echo "<br><br>".$upload->file_id."<br>"; echo $upload->link."<br>"; } if( PodioFile::attach( $upload->file_id, array('ref_type' => 'item', 'ref_id' => 43 )) != ""){ echo "<br><br>Image attached to item!<br>"; } }catch (PodioError $e) { echo $e->body['error_description']; } Podio::set_debug(true);