Skip to content

Commit

Permalink
Fix error on delete method (#53)
Browse files Browse the repository at this point in the history
* Fix error on delete method

* Update to work with V1
  • Loading branch information
ryanito committed May 21, 2022
1 parent dae103b commit f1d821f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Controllers/FilepondController.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ private function persistFileIfDone($disk, $basePath, $length, $finalFilePath)
public function delete(Request $request)
{
$filePath = $this->filepond->getPathFromServerId($request->getContent());
if (Storage::disk(config('filepond.temporary_files_disk', 'local'))->delete($filePath)) {
$folderPath = dirname($filePath);
if (Storage::disk(config('filepond.temporary_files_disk', 'local'))->deleteDirectory($folderPath)) {
return Response::make('', 200, [
'Content-Type' => 'text/plain',
]);
Expand Down

0 comments on commit f1d821f

Please sign in to comment.