Download the PHP package devhammed/byteship-php without Composer

On this page you can find all versions of the php package devhammed/byteship-php. 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 byteship-php

Byteship PHP

Latest Version on Packagist GitHub Tests Action Status Total Downloads Laravel Compatibility

Table of Contents

Introduction

PHP client & Laravel storage adapter for Byteship.

Installation

You can install the package via composer:

Usage

The first thing you need to do is to get an API key at Byteship. You'll find more info at the Byteship Docs.

Create a Client

Create the client with a full project API key only on trusted server code. Browser code should use a short-lived upload token minted by your backend.

Server client

Upload client

Keep API keys server-side!

Never ship a bship_... project API key to the browser. Use createUploadToken on your server and pass the returned bsut_... token to frontend code.

Upload a File

Use upload when you want the SDK to create the upload session, send the bytes to storage, complete the upload, and return the ready file.

Multiple Files

Use uploadMany for batches. Each result keeps the original file, a status, and either the uploaded file or a Byteship\Error.

File Methods

Server clients can read file metadata, create temporary URLs for private files, download file, and delete stored files when the credential has the required scope.

Manual Flow

Use the lower-level methods when you need to own one part of the flow, such as sending the file bytes with a custom upload client.

Errors

Every SDK API request throws Byteship\Error for non-2xx responses.

Laravel

This package ships with a service provider for Laravel that will automatically setup the client for your application.

To get started, create an environment variable named BYTESHIP_API_KEY in your .env file with your Byteship API key:

Then, open config/filesystems.php and add the byteship disk configuration:

You should now be able to use the Byteship disk in your Laravel application just like any other storage drivers:

RECOMMENDED: You should set the default disk to byteship inside config/filesystems.php so you won't have to specify the disk name everytime you work with Storage.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of byteship-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
graham-campbell/guzzle-factory Version ^4.0.2|^5.0|^6.0|^7.0
guzzlehttp/guzzle Version ^6.2|^7.0
illuminate/contracts Version ^11.0||^12.0||^13.0
league/flysystem Version ^3.25.1
spatie/laravel-package-tools Version ^1.16
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 devhammed/byteship-php contains the following files

Loading the files please wait ...