Download the PHP package files.com/files-php-sdk without Composer

On this page you can find all versions of the php package files.com/files-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package files-php-sdk

Files.com PHP SDK

The Files.com PHP SDK provides convenient Files.com API access to applications written in PHP.

Installation

Install Composer. See https://packagist.org for more info.

If composer.phar is already available, skip this step.

curl -sS https://getcomposer.org/installer | php

Install the SDK

php composer.phar require files.com/files-php-sdk

Requirements

Usage

Import and initialize

Authentication

There are multiple ways to authenticate to the API.

Global API Key

You can set an API key globally like this:

Per-Request API Key

Or, you can pass an API key per-request, in the options array at the end of every method like this:

User Session

Or, you can open a user session by calling \Files\Model\Session::create()

Then use it globally for all subsequent API calls like this:

Or, you can pass the session ID per-request, in the options array at the end of every method like this:

Session example

Setting Global Options

You can set the following global properties directly on the \Files\Files class:

Static File Operations

List files in root folder

Uploading a file on disk

Uploading raw file data

Download a file to stream

Download a file to disk

Getting a file record by path

File Object Operations

Getting a file record by path

Updating metadata
Retrieving metadata

Comparing Case insensitive files and paths

For related documentation see Case Sensitivity Documentation.

Additional Documentation

Additional docs are available at https://developers.files.com

Migrating to Version 2.0 from previous versions

In Version 2.0, the Files.com PHP SDK was updated to comply with both the PSR-12 coding standard and the PSR-4 autoloading standard. No new classes were added or any exising classes removed, but some where moved to comply with the PSR-4 standard. If a client of the sdk references the moved classes, the client code will need to be updated to reference the new location of these classes.

Exception Classes

The affected classes where primarly Exception classes. Exceptions where moved into their own namespace (and source files).

The following table shows the classes that where changed for compliance

Base Exceptions

The Base exception were moved from the \Files namespace to the \Files\Exception namespace.

Examples of Base Exceptions Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\ApiException Files\Exception\ApiException
\Files\FilesException Files\Exception\FilesException
\Files\ConfigurationException Files\Exception\ConfigurationException

BadRequest Exceptions

The BadRequest group of exceptions were moved from the \Files\BadRequest namespace to the \Files\Exception\BadRequest namespace.

Example of BadRequest Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\BadRequest\AgentUpgradeRequiredException Files\Exception\BadRequest\AgentUpgradeRequiredException

NotAuthenticated Exceptions

The NotAuthenticated group of exceptions were moved from the \Files\NotAuthenticated namespace to the \Files\Exception\NotAuthenticated namespace.

Example of NotAuthenticated Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\NotAuthenticated\AdditionalAuthenticationRequiredException Files\Exception\NotAuthenticated\AdditionalAuthenticationRequiredException

NotAuthorized Exceptions

The NotAuthorized group of exceptions were moved from the \Files\NotAuthorized namespace to the \Files\Exception\NotAuthorized namespace.

Example of NotAuthorized Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\NotAuthorized\ApiKeyIsDisabledException Files\Exception\NotAuthorized\ApiKeyIsDisabledException

NotFound Exceptions

The NotFound group of exceptions were moved from the \Files\NotFound namespace to the \Files\Exception\NotFound namespace.

Example of NotFound Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\NotFound\ApiKeyNotFoundException Files\Exception\NotFound\ApiKeyNotFoundException

ProcessingFailure Exceptions

The ProcessingFailure group of exceptions were moved from the \Files\ProcessingFailure namespace to the \Files\Exception\ProcessingFailure namespace.

Example of ProcessingFailure Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\ProcessingFailure\AlreadyCompletedException Files\Exception\ProcessingFailure\AlreadyCompletedException

RateLimited Exceptions

The ProcessingFailure group of exceptions were moved from the \Files\RateLimited namespace to the \Files\Exception\RateLimited namespace.

Example of RateLimited Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\RateLimited\DuplicateShareRecipientException Files\Exception\RateLimited\DuplicateShareRecipientException

ServiceUnavailable Exceptions

The ServiceUnavailable group of exceptions were moved from the \Files\ServiceUnavailable namespace to the \Files\Exception\ServiceUnavailable namespace.

Example of ServiceUnavailable Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\ServiceUnavailable\AgentUnavailableException Files\Exception\ServiceUnavailable\AgentUnavailableException

SiteConfiguration Exceptions

The SiteConfiguration group of exceptions were moved from the \Files\SiteConfiguration namespace to the \Files\Exception\SiteConfiguration namespace.

Example of SiteConfiguration Classes moved.

SDK < 2.0 Class Location SDK >= 2.0 Class Location
\Files\SiteConfiguration\AccountAlreadyExistsException Files\Exception\SiteConfiguration\AccountAlreadyExistsException

Getting Support

The Files.com team is happy to help with any SDK Integration challenges you may face.

Just email [email protected] and we'll get the process started.


All versions of files-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
ext-curl Version *
ext-json Version *
ext-mbstring Version *
ext-intl Version *
guzzlehttp/guzzle Version ^6 || ^7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package files.com/files-php-sdk contains the following files

Loading the files please wait ....