sociallydev/spaces-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sociallydev/spaces-api

最新稳定版本:3.6.1

Composer 安装命令:

composer require sociallydev/spaces-api

包简介

Library for accessing Digital Ocean spaces

README 文档

README

We recommend using the official SDK or the Laravel package

All issues will be closed and new PRs will not be accepted

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');

// Move or rename a file
$file2->move('new-filename.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

统计信息

  • 总下载量: 412k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 218
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 217
  • Watchers: 10
  • Forks: 100
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-07