php - how to upload file from codeigniter app to dropbox -


i have controller upload image web server. want upload image dropbox during process. how it?

this simple upload.php controller:

function index() {     // binary data     $file = file_get_contents("php://input");      // prepare new name upload image     $name =rand().time().'jpg';      $path = site_url('photo');      // save server directory     file_put_contents($path.$name, $file);      // save name , id of post post photo table     $input =  array(    'name' => $name,                         'post_id'=> $id                     );      $this->db->insert('post_photo', $input);  } 

this blogpost has complete tutorial
how use dropbox api codigniter using this codeigniter-dropbox-api-library

http://jimdoescode.blogspot.com/2011/07/codeigniter-dropbox-api.html


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -