Skip to content

Commit

Permalink
Preparing release 🔖
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulhaque committed Jul 10, 2024
1 parent 656c488 commit 6695802
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-filepond` will be documented in this file.

## 11.0.1 - 2024-07-10

- Fixed large file processing (out of memory exception) 🐛.

## 11.0.0 - 2024-03-15

- Laravel 11 support added. ✨
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A straight forward backend support for Laravel application to work with [FilePon
- Controller/Request level validation before moving the temporary files to permanent location.
- Scheduled artisan command to clean up temporary files and folders after they have expired.
- Can handle filepond's `process`, `patch`, `head`, `revert` and `restore` endpoints.
- Can handle large files efficiently.

Support the development with a :star: to let others know it worked for you.

Expand Down
5 changes: 4 additions & 1 deletion src/Filepond.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace RahulHaque\Filepond;

use Illuminate\Http\File;
use Illuminate\Support\Facades\Storage;
use RahulHaque\Filepond\Models\Filepond as FilepondModel;

Expand Down Expand Up @@ -182,7 +183,9 @@ private function putFile(FilepondModel $filepond, string $path, string $disk, st
{
$permanentDisk = $disk == '' ? $filepond->disk : $disk;

Storage::disk($permanentDisk)->put($path.'.'.$filepond->extension, Storage::disk($this->getTempDisk())->get($filepond->filepath), $visibility);
$pathInfo = pathinfo($path);

Storage::disk($permanentDisk)->putFileAs($pathInfo['dirname'], new File(Storage::disk($this->getTempDisk())->path($filepond->filepath)), $pathInfo['filename'].'.'.$filepond->extension, $visibility);

return [
'id' => $filepond->id,
Expand Down

0 comments on commit 6695802

Please sign in to comment.