Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

Move signed upload URL TTL into config/trypost.php.

Paulo Castellano302d902f755f
diff --git a/app/Mcp/Tools/Post/RequestMediaUploadTool.php b/app/Mcp/Tools/Post/RequestMediaUploadTool.php
index 1352458e2..2f1e4b9cc 100644
--- a/app/Mcp/Tools/Post/RequestMediaUploadTool.php
+++ b/app/Mcp/Tools/Post/RequestMediaUploadTool.php
@@ -25,7 +25,7 @@ class RequestMediaUploadTool extends Tool
// 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);
diff --git a/config/ai.php b/config/ai.php
index 228d6fc96..1a393ff01 100644
--- a/config/ai.php
+++ b/config/ai.php
@@ -39,23 +39,6 @@ return [
],
],
- /*
- |--------------------------------------------------------------------------
- | 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
diff --git a/config/trypost.php b/config/trypost.php
index 96749e8ae..3196567ec 100644
--- a/config/trypost.php
+++ b/config/trypost.php
@@ -56,6 +56,9 @@ return [
| 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 @@ return [
// 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),
],
/*