Restore toolbar background to bg-nebula; add toolbar backdrop blur
This commit is contained in:
@@ -22,7 +22,7 @@ final class ArtworkDraftService
|
||||
'slug' => $slug,
|
||||
'description' => $description,
|
||||
'file_name' => 'pending',
|
||||
'file_path' => 'pending',
|
||||
'file_path' => '',
|
||||
'file_size' => 0,
|
||||
'mime_type' => 'application/octet-stream',
|
||||
'width' => 1,
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\DTOs\Uploads\UploadSessionData;
|
||||
use App\DTOs\Uploads\UploadInitResult;
|
||||
use App\DTOs\Uploads\UploadValidatedFile;
|
||||
use App\DTOs\Uploads\UploadScanResult;
|
||||
use App\Models\Artwork;
|
||||
use App\Repositories\Uploads\ArtworkFileRepository;
|
||||
use App\Repositories\Uploads\UploadSessionRepository;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
@@ -121,6 +122,22 @@ final class UploadPipelineService
|
||||
$publicRelative[$variant] = $relativePath;
|
||||
}
|
||||
|
||||
$dimensions = @getimagesize($session->tempPath);
|
||||
$width = is_array($dimensions) && isset($dimensions[0]) ? (int) $dimensions[0] : 1;
|
||||
$height = is_array($dimensions) && isset($dimensions[1]) ? (int) $dimensions[1] : 1;
|
||||
|
||||
Artwork::query()->whereKey($artworkId)->update([
|
||||
'file_name' => basename($originalRelative),
|
||||
'file_path' => '',
|
||||
'file_size' => (int) filesize($originalPath),
|
||||
'mime_type' => 'image/webp',
|
||||
'hash' => $hash,
|
||||
'file_ext' => 'webp',
|
||||
'thumb_ext' => 'webp',
|
||||
'width' => max(1, $width),
|
||||
'height' => max(1, $height),
|
||||
]);
|
||||
|
||||
$this->sessions->updateStatus($sessionId, UploadSessionStatus::PROCESSED);
|
||||
$this->sessions->updateProgress($sessionId, 100);
|
||||
$this->audit->log($session->userId, 'upload_processed', $session->ip, [
|
||||
|
||||
Reference in New Issue
Block a user