diff --git a/app/Http/Requests/Api/StoreUploadRequest.php b/app/Http/Requests/Api/StoreUploadRequest.php index df5a1c3d..812c8ac9 100644 --- a/app/Http/Requests/Api/StoreUploadRequest.php +++ b/app/Http/Requests/Api/StoreUploadRequest.php @@ -24,7 +24,7 @@ public function rules(): array MediaType::Video->allowedMimeTypes(), )); - $maxKb = (int) config('trypost.mcp.upload.max_size_mb') * 1024; + $maxKb = (int) config('ai.mcp.upload.max_size_mb') * 1024; return [ 'media' => [ diff --git a/app/Mcp/Tools/Post/RequestMediaUploadTool.php b/app/Mcp/Tools/Post/RequestMediaUploadTool.php index b455ccd4..354e9100 100644 --- a/app/Mcp/Tools/Post/RequestMediaUploadTool.php +++ b/app/Mcp/Tools/Post/RequestMediaUploadTool.php @@ -22,8 +22,8 @@ public function handle(Request $request): Response|ResponseFactory $user = $request->user(); $workspaceId = $user->current_workspace_id; - $maxBytes = (int) config('trypost.mcp.upload.max_size_mb') * 1024 * 1024; - $ttlMinutes = (int) config('trypost.mcp.upload.url_ttl_minutes'); + $maxBytes = (int) config('ai.mcp.upload.max_size_mb') * 1024 * 1024; + $ttlMinutes = (int) config('ai.mcp.upload.url_ttl_minutes'); $token = (string) Str::uuid(); $expiresAt = CarbonImmutable::now()->addMinutes($ttlMinutes); diff --git a/config/ai.php b/config/ai.php index 1a393ff0..c28a3160 100644 --- a/config/ai.php +++ b/config/ai.php @@ -39,6 +39,25 @@ ], ], + /* + |-------------------------------------------------------------------------- + | MCP Media Upload + |-------------------------------------------------------------------------- + | + | Settings for the MCP signed-URL upload flow. The hard cap is enforced + | per upload regardless of media type and is intentionally smaller than + | the per-type caps in config('trypost.media') because uploads flow + | through the app server. + | + */ + + 'mcp' => [ + 'upload' => [ + 'max_size_mb' => (int) env('MCP_UPLOAD_MAX_SIZE_MB', 50), + 'url_ttl_minutes' => (int) env('MCP_UPLOAD_URL_TTL_MINUTES', 15), + ], + ], + /* |-------------------------------------------------------------------------- | AI Providers diff --git a/config/trypost.php b/config/trypost.php index 2280ac2e..9ab2e2b9 100644 --- a/config/trypost.php +++ b/config/trypost.php @@ -34,24 +34,6 @@ ], ], - /* - |-------------------------------------------------------------------------- - | MCP Media Upload - |-------------------------------------------------------------------------- - | - | Settings for the MCP signed-URL upload flow. The hard cap is enforced - | per upload regardless of media type and is intentionally smaller than - | the per-type caps above because uploads flow through the app server. - | - */ - - 'mcp' => [ - 'upload' => [ - 'max_size_mb' => (int) env('MCP_UPLOAD_MAX_SIZE_MB', 50), - 'url_ttl_minutes' => (int) env('MCP_UPLOAD_URL_TTL_MINUTES', 15), - ], - ], - /* |-------------------------------------------------------------------------- | Google Authentication