refactor(mcp): move upload config from trypost.mcp to ai.mcp
This commit is contained in:
parent
6b40edce55
commit
7341852f5c
4 changed files with 22 additions and 21 deletions
|
|
@ -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' => [
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue