Add images to tasks
Everyone who may comment on a task sends images to it, e.g. photos taken with a phone. The server stores an upright, at most 2560 px JPEG without EXIF data (no location) and a 400 px thumbnail on the private disk, served only to those who see the job. Uploaders change captions (also the alt text) and remove their own images; admin and management may remove anyone's (jobs.remove-any-task-image). Removing a task also removes its image files. Livewire's temporary upload limit is raised to PHP's 40 MB so that the page's own 12 MB limit gives a translated message. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Modules\Jobs\Presentation\Http\Controllers\ShowTaskImage;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::middleware(['web', 'auth', 'can:jobs.view'])
|
||||
@@ -16,4 +17,8 @@ Route::middleware(['web', 'auth', 'can:jobs.view'])
|
||||
Route::livewire('/{job}/tasks/create', 'jobs::task-form')->whereNumber('job')->name('tasks.create');
|
||||
Route::livewire('/{job}/tasks/from-template', 'jobs::tasks-from-template')->whereNumber('job')->name('tasks.from-template');
|
||||
Route::livewire('/{job}/tasks/{task}/edit', 'jobs::task-form')->whereNumber(['job', 'task'])->name('tasks.edit');
|
||||
Route::get('/{job}/tasks/{task}/images/{image}/{size}', ShowTaskImage::class)
|
||||
->whereNumber(['job', 'task', 'image'])
|
||||
->whereIn('size', ['full', 'thumbnail'])
|
||||
->name('tasks.images.show');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user