mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update ComposeController, use MediaStorageService for media deletes
This commit is contained in:
parent
37dbb3de29
commit
ab5469ff70
1 changed files with 3 additions and 2 deletions
|
@ -38,6 +38,7 @@ use App\Jobs\VideoPipeline\{
|
||||||
use App\Services\NotificationService;
|
use App\Services\NotificationService;
|
||||||
use App\Services\MediaPathService;
|
use App\Services\MediaPathService;
|
||||||
use App\Services\MediaBlocklistService;
|
use App\Services\MediaBlocklistService;
|
||||||
|
use App\Services\MediaStorageService;
|
||||||
use App\Services\MediaTagService;
|
use App\Services\MediaTagService;
|
||||||
use App\Services\ServiceService;
|
use App\Services\ServiceService;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
@ -193,8 +194,7 @@ class ComposeController extends Controller
|
||||||
->whereUserId(Auth::id())
|
->whereUserId(Auth::id())
|
||||||
->findOrFail($request->input('id'));
|
->findOrFail($request->input('id'));
|
||||||
|
|
||||||
Storage::delete($media->media_path);
|
MediaStorageService::delete($media, true);
|
||||||
Storage::delete($media->thumbnail_path);
|
|
||||||
|
|
||||||
$media->forceDelete();
|
$media->forceDelete();
|
||||||
|
|
||||||
|
@ -388,6 +388,7 @@ class ComposeController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$status->caption = strip_tags($request->caption);
|
$status->caption = strip_tags($request->caption);
|
||||||
|
$status->rendered = Autolink::create()->autolink($status->caption);
|
||||||
$status->scope = 'draft';
|
$status->scope = 'draft';
|
||||||
$status->profile_id = $profile->id;
|
$status->profile_id = $profile->id;
|
||||||
$status->save();
|
$status->save();
|
||||||
|
|
Loading…
Reference in a new issue