Library for using Digital Ocean Spaces storage with Codeigniter Framework. This is based on https://github.com/SociallyDev/Spaces-API. Visit the link to see the original usage.
Please edit application/libraries/Space.php $key = "xxxxxxxxx";
$secret = "xxxxxxxxx";
$space_name = "xxxxxx";
$region = "xxxxxx";
$this->space = new SpacesConnect($key, $secret, $space_name, $region);
$photo = "myfile.png";
$new_filename = "mynewfilename.png";
$this->space->space->UploadFile($photo, "public", "path_for_your_file/".$new_filename, "image/png");
#space will create new folder automatically
$photo = "myfile.png";
$this->space->space->DeleteObject("path_for_your_file/".$photo);