PHPackages                             rsp/oss-factory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rsp/oss-factory

ActiveLibrary

rsp/oss-factory
===============

the oss-factory is a aliyun/oss collection package

V1.2.4(6y ago)012MITPHP

Since Aug 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/a13363731755/oss-ossFactory)[ Packagist](https://packagist.org/packages/rsp/oss-factory)[ RSS](/packages/rsp-oss-factory/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (1)Versions (8)Used By (0)

oss-ossFactory
==============

[](#oss-ossfactory)

the oss-factory is a aliyun/oss collection package

[![Latest Stable Version](https://camo.githubusercontent.com/e8908e8bc1c9b3e02e7160fc2a9964cdc2d29bc99b67e9819f9b9a2cf06fe63a/68747470733a2f2f706f7365722e707567782e6f72672f616c6979756e63732f6f73732d73646b2d7068702f762f737461626c65)](https://packagist.org/packages/aliyuncs/oss-sdk-php)[![Build Status](https://camo.githubusercontent.com/983677156ea437eacc4b00a4542eee919666449d85eb406665c1ef8c219d6642/68747470733a2f2f7472617669732d63692e6f72672f616c6979756e2f616c6979756e2d6f73732d7068702d73646b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aliyun/aliyun-oss-php-sdk)[![Coverage Status](https://camo.githubusercontent.com/f0b831305d1ac7300cb277b5fee4851b975a4773242895d5591fa807f2e3a44d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616c6979756e2f616c6979756e2d6f73732d7068702d73646b2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/aliyun/aliyun-oss-php-sdk?branch=master)

[README of Chinese](https://github.com/aliyun/aliyun-oss-php-sdk/blob/master/README-CN.md)
------------------------------------------------------------------------------------------

[](#readme-of-chinese)

Overview
--------

[](#overview)

Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring a massive capacity, security, a low cost, and high reliability. You can upload and download data on any application anytime and anywhere by calling APIs, and perform simple management of data through the web console. The OSS can store any type of files and therefore applies to various websites, development enterprises and developers.

Run environment
---------------

[](#run-environment)

- PHP 7.1+.
- cURL extension.

Tips:

- In Ubuntu, you can use the ***apt-get*** package manager to install the *PHP cURL extension*: `sudo apt-get install php7-curl`.

Install OSS PHP SDK
-------------------

[](#install-oss-php-sdk)

- If you use the ***composer*** to manage project dependencies, run the following command in your project's root directory:

    ```
      composer require rsp/oss-factory

    ```

    You can also declare the dependency on Alibaba Cloud OSS SDK for PHP in the `composer.json` file.

    ```
      "require": {
          "rsp/oss-factory": "V1.2.1"
      }

    ```

    Finally, you will want to publish the config using the following command:

    Laravel 4:

    ```
      $ php artisan config:publish rsp/oss-factory

    ```

    Laravel 5:

    ```
      $ php artisan vendor:publish --provider="AliOss\OssFactory\Src\OssServiceProvider"

    ```

Quick use
---------

[](#quick-use)

### Common classes

[](#common-classes)

ClassExplanationAliOss\\OssFactory\\Src\\OssServiceOSS client class. An OSSClient instance can be used to call the interface.Src\\Exceptions\\ServerDisposeExceptionOSS Exception class . You only need to pay attention to this exception when you use the OSSClient.### Initialize an OSSClient

[](#initialize-an-ossclient)

The SDK's operations for the OSS are performed through the OSSClient class. The code below creates an OSSClient object:

```
