Skip to content

Library for using Digital Ocean Spaces storage with Codeigniter Framework

Notifications You must be signed in to change notification settings

jpnetwork/DigitalOcean-Spaces-Codeigniter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 

Repository files navigation

DigitalOcean-Spaces-Codeigniter

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.

How to Connect to your Space

Please edit application/libraries/Space.php
  $key = "xxxxxxxxx";
  $secret = "xxxxxxxxx";
  $space_name = "xxxxxx";
  $region = "xxxxxx";
        
 $this->space = new SpacesConnect($key, $secret, $space_name, $region); 

How to upload files to your Space

$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

How to delete files from your Space

$photo = "myfile.png";
$this->space->space->DeleteObject("path_for_your_file/".$photo);

About

Library for using Digital Ocean Spaces storage with Codeigniter Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages