Move signed upload URL TTL into config/trypost.php.
Keep API media upload settings out of the Laravel AI package config so they are not overwritten on package updates. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3175fbe8c2
commit
302d902f75
3 changed files with 5 additions and 18 deletions
|
|
@ -25,7 +25,7 @@ public function handle(Request $request): Response|ResponseFactory
|
|||
|
||||
// Same ceiling the web/API FormRequests use (largest per-type cap).
|
||||
$maxBytes = MediaType::Video->maxSizeInBytes();
|
||||
$ttlMinutes = (int) config('ai.mcp.upload.url_ttl_minutes');
|
||||
$ttlMinutes = (int) config('trypost.media.signed_upload_url_ttl_minutes');
|
||||
|
||||
$token = (string) Str::uuid();
|
||||
$expiresAt = CarbonImmutable::now()->addMinutes($ttlMinutes);
|
||||
|
|
|
|||
|
|
@ -39,23 +39,6 @@
|
|||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MCP Media Upload
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Settings for the MCP signed-URL upload flow. Size caps come from
|
||||
| config('trypost.media.max_size_mb') via Media\Type — same source as
|
||||
| web and REST API uploads.
|
||||
|
|
||||
*/
|
||||
|
||||
'mcp' => [
|
||||
'upload' => [
|
||||
'url_ttl_minutes' => (int) env('MCP_UPLOAD_URL_TTL_MINUTES', 15),
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| AI Providers
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@
|
|||
| uploads (StoreAssetRequest, AssetController::storeChunked), URL
|
||||
| fetches (MediaAttacher), and the MediaType enum all read from here.
|
||||
|
|
||||
| signed_upload_url_ttl_minutes controls the temporary signed POST URL
|
||||
| issued for api.uploads.store (MCP / direct upload flow).
|
||||
|
|
||||
*/
|
||||
|
||||
'media' => [
|
||||
|
|
@ -65,6 +68,7 @@
|
|||
// LinkedIn caps document (PDF carousel) uploads at 100MB.
|
||||
'document' => (int) env('MEDIA_DOCUMENT_MAX_SIZE_MB', 100),
|
||||
],
|
||||
'signed_upload_url_ttl_minutes' => (int) env('MEDIA_SIGNED_UPLOAD_URL_TTL_MINUTES', 15),
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue