Skip to content

Commit

Permalink
Merge pull request #18 from TappNetwork/update_libraries
Browse files Browse the repository at this point in the history
Updates to allow the new version of the libraries
  • Loading branch information
andreia authored Feb 14, 2023
2 parents 653df04 + 0923411 commit 69a0243
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 208 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/run-tests-l8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ jobs:
fail-fast: false
matrix:
php: [8.1, 8.0]
laravel: [9.*, 8.*]
laravel: [9.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand Down
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ Add on your `package.json` file the Uppy JS libraries and AlpineJS library:
```
...
"devDependencies": {
"alpinejs": "^2.7.3",
"alpinejs": "^3.11.1",
...
},
"dependencies": {
"@uppy/aws-s3-multipart": "^2.0.2",
"@uppy/core": "^2.0.2",
"@uppy/drag-drop": "^2.0.1",
"@uppy/status-bar": "^2.0.1"
"@uppy/aws-s3-multipart": "^3.1.2",
"@uppy/core": "^3.0.5",
"@uppy/drag-drop": "^3.0.1",
"@uppy/status-bar": "^3.0.1"
...
}
...
Expand Down Expand Up @@ -65,14 +65,25 @@ Add in your `resources/js/app.js`:

```javascript
...
require('alpinejs');
import Alpine from 'alpinejs';

window.Alpine = Alpine;

Alpine.start();
```

Install the JS libraries:

for Mix:
```
npm install
npm run dev
```

for Vite:
```
$ npm install
$ npm run dev
npm install
npm run build
```

> You can use CDNs for [Uppy](https://uppy.io/docs/#With-a-script-tag) and [AlpineJS](https://github.com/alpinejs/alpine), if you prefer.
Expand Down Expand Up @@ -223,7 +234,7 @@ This package add the following routes:
POST /s3/multipart
OPTIONS /s3/multipart
GET /s3/multipart/{uploadId}
GET /s3/multipart/{uploadId}/batch
GET /s3/multipart/{uploadId}/{partNumber}
POST /s3/multipart/{uploadId}/complete
DELETE /s3/multipart/{uploadId}
```
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/input/uppy.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{ $extraJSForOnUploadSuccess }}
};
uppyUpload{{ $hiddenField }} = new Uppy({{ $options }});
const uppyUpload{{ $hiddenField }} = new Uppy({{ $options }});
uppyUpload{{ $hiddenField }}
.use(DragDrop, {{ $dragDropOptions }})
Expand Down
9 changes: 2 additions & 7 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
use Illuminate\Support\Facades\Route;
use Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController;

Route::options('/s3/multipart', [UppyS3MultipartController::class, 'createPreflightHeader']);
Route::post('/s3/multipart', [UppyS3MultipartController::class, 'createMultipartUpload']);

Route::options('/s3/multipart', [UppyS3MultipartController::class, 'createMultipartUploadOptions']);

Route::get('/s3/multipart/{uploadId}', [UppyS3MultipartController::class, 'getUploadedParts']);

Route::get('/s3/multipart/{uploadId}/batch', [UppyS3MultipartController::class, 'prepareUploadParts']);

Route::post('/s3/multipart/{uploadId}/complete', [UppyS3MultipartController::class, 'completeMultipartUpload']);

Route::delete('/s3/multipart/{uploadId}', [UppyS3MultipartController::class, 'abortMultipartUpload']);
Route::get('/s3/multipart/{uploadId}/{partNumber}', [UppyS3MultipartController::class, 'signPartUpload']);
Loading

0 comments on commit 69a0243

Please sign in to comment.