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]>
27 lines
735 B
PHP
27 lines
735 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Jobs\Application\Contracts;
|
|
|
|
use App\Modules\Jobs\Application\DTOs\TaskImageFile;
|
|
use App\Modules\Jobs\Application\DTOs\TaskImageSummary;
|
|
|
|
interface TaskImageQueries
|
|
{
|
|
/**
|
|
* The task's images, oldest first; empty when the task belongs to
|
|
* another job.
|
|
*
|
|
* @return list<TaskImageSummary>
|
|
*/
|
|
public function imagesOf(int $jobId, int $taskId): array;
|
|
|
|
/**
|
|
* Where the full image or its thumbnail is kept, for showing it after
|
|
* the job's visibility is checked; null when the image does not belong
|
|
* to the task and job.
|
|
*/
|
|
public function fileOf(int $jobId, int $taskId, int $imageId, bool $thumbnail): ?TaskImageFile;
|
|
}
|