Download the PHP package tapp/laravel-uppy-s3-multipart-upload without Composer

On this page you can find all versions of the php package tapp/laravel-uppy-s3-multipart-upload. 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 laravel-uppy-s3-multipart-upload

Multipart Uploads using Laravel, AWS S3, and Uppy

Latest Version on Packagist PHPStan Total Downloads

Upload large files directly to AWS S3 using Laravel (backend) and Uppy (frontend).

Appearance

upload00

upload01

upload02

Installation

Install the package via Composer

Add required JS libraries

Add on your package.json file the Uppy JS libraries and AlpineJS library:

Add in your resources/js/bootstrap.js file:

Add in your resources/js/app.js:

Install the JS libraries:

for Mix:

for Vite:

You can use CDNs for Uppy and AlpineJS, if you prefer.

Publish config file

Publish the config file with:

This is the contents of the published config file:

Publish view file

AWS S3 Setup

This package installs the AWS SDK for PHP and use Laravel's default s3 disk configuration from config/filesystems.php file.

You just have to add your S3 keys, region, and bucket using the following env vars in your .env file:

Warning

The AWS_URL or AWS_POST_END_POINT env vars should only be set when using a custom, non-aws endpoint. For more details please refer to this issue: https://github.com/TappNetwork/laravel-uppy-s3-multipart-upload/issues/14.

To allow direct multipart uploads to your S3 bucket, you need to add some extra configuration on bucket's CORS configuration. On your AWS S3 console, select your bucket. Click on "Permissions" tab. On "CORS configuration" add the following configuration:

On AllowedOrigins:

You should list the URLs allowed, e.g.:

https://uppy.io/docs/aws-s3-multipart/#S3-Bucket-Configuration

https://uppy.io/docs/aws-s3/#S3-Bucket-configuration

Add S3 Transfer Acceleration

To use S3 transfer acceleration, enable it by adding a AWS_USE_ACCELERATE_ENDPOINT=true env var on your .env file, and add 'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT') in s3 options on your config/filesystems.php:

Configuration

You can configure the folder to upload the files and the expiration of the presigned URLs used to upload the parts, with the config/uppy-s3-multipart-upload.php file:

Endpoints added

This package add the following routes:

Usage

Add a hidden field for the uploaded file url

Add a hidden input form element on your blade template. When the upload is finished, it will receive the url of the uploaded file:

E.g.:

Add the uppy blade component to your blade view:

Passing data to the uppy blade component

Hidden field name

Use the hiddenField attribute to provide the name of the hidden field that will receive the url of uploaded file:

The file name will be used if none is provided.

Uppy Core Options

https://uppy.io/docs/uppy/#Options

You can pass any uppy options via options attribute:

Uppy core options are in this format:

Default core options if none is provided:

Uppy Status Bar Options

https://uppy.io/docs/status-bar/#Options

You can pass any uppy status bar options via statusBarOptions attribute:

Uppy Status Bar options are in this format:

Default status bar options if none is provided:

Uppy Drag & Drop Options

https://uppy.io/docs/drag-drop/#Options

You can pass any uppy drag & drop options via dragDropOptions attribute:

Uppy Drag & Drop options are in this format:

Default drag & drop options if none is informed:

Upload Element Class

Use the uploadElementClass attribute to provide the class of the HTML element used for upload:

The upload class will be used if none is provided.

Multiple Uppy Instances

If you want to use multiple Uppy instances, add a different uploadElementClass attribute to each instance. E.g.:

Note from Uppy docs: "If multiple Uppy instances are being used, for instance, on two different pages, an id should be specified. This allows Uppy to store information in localStorage without colliding with other Uppy instances." Learn more here.

Extra JavaScript to onUploadSuccess

If you need to add extra JavaScript code on onUploadSuccess function, use the extraJSForOnUploadSuccess attribute:

E.g.:

Default extraJSForOnUploadSuccess value is empty string.

Clear caches

Run:

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security-related issues, please email [email protected].

Credits

Libraries used in this package:

License

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


All versions of laravel-uppy-s3-multipart-upload with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
league/flysystem-aws-s3-v3 Version ^3.0
spatie/laravel-package-tools Version ^1.1
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.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 tapp/laravel-uppy-s3-multipart-upload contains the following files

Loading the files please wait ....