Need help with Spaces-API?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

SociallyDev
195 Stars 88 Forks MIT License 86 Commits 2 Opened issues

Description

An API wrapper for DigitalOcean's Spaces object storage designed for easy use.

Services available

!
?

Need anything else?

Contributors list

# 224,066
PHP
digital...
Amazon ...
Shell
52 commits
# 506,970
PHP
digital...
Amazon ...
Shell
2 commits
# 412,465
PHP
Shell
digital...
Amazon ...
2 commits
# 553,669
PHP
digital...
Amazon ...
Shell
1 commit
# 18,886
Mongoos...
gc
ooxml
mdui
1 commit
# 562,336
PHP
digital...
Amazon ...
Shell
1 commit
# 557,891
Laravel
JavaScr...
CSS
digital...
1 commit

Spaces-API

PHP library for accessing Digital Ocean spaces

Installation

Install via composer

composer require sociallydev/spaces-api

Quick start

Obtain API keys from the Digital Ocean Applications & API dashboard

use SpacesAPI\Spaces;

// Connect to a space $spaces = new Spaces('api-key', 'api-secret'); $space = $spaces->space('space-name');

// Download a file $file = $space->file('remote-file-1.txt'); $file->download('local/file/path/file.txt');

// Upload text to a file $file2 = $space->uploadText("Lorem ipsum","remote-file-2.txt");

// Get a signed public link, valid for 2 hours $file2url = $file2->getSignedURL("2 hours");

// Make a copy $file3 = $file2->copy('remote-file-3.txt');

// Make a file public and get the URL $file3->makePublic(); $file3url = $file3->getURL();

See more examples in docs/Examples.md

Upgrading?

Version 3 has many changes over version 2, so we have written a migration guide

API reference

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.