Download the PHP package appoly/s3-uploader without Composer

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

🚀 S3 Uploader for Laravel

Latest Version on Packagist Total Downloads License

A Laravel package for handling S3 multipart uploads with presigned URLs. Perfect for uploading large files directly from the browser to S3.


✨ Features


📦 Installation


⚙️ Configuration

Publish the config file:

By default, the package uses your s3 filesystem disk configuration. Override in config/s3-uploader.php or via environment variables.

🔑 Environment Variables

Variable Default Description
S3_UPLOADER_BUCKET S3 disk bucket S3 bucket name
S3_UPLOADER_REGION S3 disk region AWS region (e.g., eu-west-2)
S3_UPLOADER_KEY S3 disk key AWS Access Key ID
S3_UPLOADER_SECRET S3 disk secret AWS Secret Access Key
S3_UPLOADER_ENDPOINT S3 disk endpoint Custom endpoint for S3-compatible services (MinIO, DigitalOcean Spaces, etc.)
S3_UPLOADER_PATH_STYLE false Use path-style URLs instead of virtual-hosted style (required for some S3-compatible services)
S3_UPLOADER_PATH_PREFIX uploads/multipart Prefix path for uploaded files in S3
S3_UPLOADER_URL_EXPIRATION +60 minutes How long presigned URLs remain valid
S3_UPLOADER_WRAP_RESPONSES false Wrap responses in {success, message, data} envelope

🚀 Usage

Using the Facade

Using Dependency Injection


🗄️ Config Options

You can also configure the package directly in config/s3-uploader.php:


🛣️ API Endpoints

The package registers these routes by default (can be customized via routes.prefix and routes.middleware):

Method Endpoint Route Name Description
POST /api/s3/multipart/initiate s3-uploader.initiate Start a multipart upload
POST /api/s3/multipart/presign-part s3-uploader.presign-part Get presigned URL for a part
POST /api/s3/multipart/complete s3-uploader.complete Complete the upload
POST /api/s3/multipart/abort s3-uploader.abort Abort the upload

POST /api/s3/multipart/initiate

Start a new multipart upload session.

Headers: Header Required Value
Content-Type Yes application/json
Accept Yes application/json
Request Body: Parameter Type Required Description
file_name string Yes Original filename (e.g., video.mp4)
content_type string No MIME type (default: application/octet-stream)

Example Request:

Example Response:


POST /api/s3/multipart/presign-part

Get a presigned URL to upload a specific part directly to S3.

Headers: Header Required Value
Content-Type Yes application/json
Accept Yes application/json
Request Body: Parameter Type Required Description
upload_id string Yes Upload ID from initiate response
file_path string Yes File path from initiate response
part_number integer Yes Part number (starts at 1)

Example Request:

Example Response:


POST /api/s3/multipart/complete

Complete the multipart upload after all parts have been uploaded to S3.

Headers: Header Required Value
Content-Type Yes application/json
Accept Yes application/json
Request Body: Parameter Type Required Description
upload_id string Yes Upload ID from initiate response
file_path string Yes File path from initiate response
parts array Yes Array of uploaded parts
parts.*.part_number integer Yes Part number
parts.*.etag string Yes ETag returned by S3 after uploading the part

Example Request:

Example Response:


POST /api/s3/multipart/abort

Abort an in-progress multipart upload and clean up any uploaded parts.

Headers: Header Required Value
Content-Type Yes application/json
Accept Yes application/json
Request Body: Parameter Type Required Description
upload_id string Yes Upload ID from initiate response
file_path string Yes File path from initiate response

Example Request:

Example Response:


📦 Response Wrapping

By default, endpoints return flat JSON responses. Enable wrap_responses to wrap all responses in a standard envelope — useful for APIs that follow a {success, message, data} convention.

Wrapped success response:

Wrapped error response (500):

When wrap_responses is false (default), responses are returned as flat JSON and errors are returned as standard Laravel exception responses.


🎨 Customizing Routes

Disable default routes and define your own:

Then in your routes file:


🌐 Frontend Example

Here's a basic JavaScript example for uploading:


🏢 Credits


Made with ❤️ by Appoly


All versions of s3-uploader with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
aws/aws-sdk-php Version ^3.0
illuminate/support Version ^11.0|^12.0
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 appoly/s3-uploader contains the following files

Loading the files please wait ...