Upload beautify

This commit is contained in:
2026-02-14 15:14:12 +01:00
parent e129618910
commit 79192345e3
249 changed files with 24436 additions and 1021 deletions

View File

@@ -0,0 +1,51 @@
<?php
namespace App\Services\Upload\Contracts;
use Illuminate\Http\UploadedFile;
interface UploadDraftServiceInterface
{
/**
* Create a new draft and return identifying info.
*
* @param array $attributes
* @return array ['id' => string, 'path' => string, 'meta' => array]
*/
public function createDraft(array $attributes = []): array;
/**
* Store the main uploaded file for the draft.
*
* @param string $draftId
* @param UploadedFile $file
* @return array Metadata about stored file (path, size, mime, hash)
*/
public function storeMainFile(string $draftId, UploadedFile $file): array;
/**
* Store a screenshot/preview image for the draft.
*
* @param string $draftId
* @param UploadedFile $file
* @return array Metadata about stored screenshot
*/
public function storeScreenshot(string $draftId, UploadedFile $file): array;
/**
* Calculate a content hash for a local file path or storage path.
*
* @param string $filePath
* @return string
*/
public function calculateHash(string $filePath): string;
/**
* Set an expiration timestamp for the draft.
*
* @param string $draftId
* @param \Carbon\Carbon|null $expiresAt
* @return bool
*/
public function setExpiration(string $draftId, ?\Carbon\Carbon $expiresAt = null): bool;
}