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.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
fix: separate image/video upload limits (10MB/1GB), accept only MP4 video
Paulo Castellano307b496bad91
diff --git a/app/Http/Requests/App/Media/StoreMediaRequest.php b/app/Http/Requests/App/Media/StoreMediaRequest.phpindex 7e689055e..5560b1533 100644--- a/app/Http/Requests/App/Media/StoreMediaRequest.php+++ b/app/Http/Requests/App/Media/StoreMediaRequest.php@@ -22,12 +22,14 @@ class StoreMediaRequest extends FormRequestpublic function rules(): array{+ $maxSize = $this->isVideoUpload() ? 1048576 : 10240; // Videos: 1GB, Images: 10MB+return ['media' => ['required','file',- 'max:1048576', // 1GB- 'mimetypes:image/jpeg,image/png,image/gif,image/webp,video/mp4,video/quicktime,video/webm,application/pdf',+ "max:{$maxSize}",+ 'mimetypes:image/jpeg,image/png,image/gif,image/webp,video/mp4',],'model' => ['required',@@ -50,11 +52,16 @@ class StoreMediaRequest extends FormRequest{return ['media.required' => 'The file is required.',- 'media.max' => 'The file must be at most 1GB.',+ 'media.max' => $this->isVideoUpload() ? 'Videos must be at most 1GB.' : 'Images must be at most 10MB.','media.mimetypes' => 'File type not supported.','model.required' => 'The model is required.','model.in' => 'Invalid model type.','model_id.required' => 'The model ID is required.',];}++ private function isVideoUpload(): bool+ {+ return str_starts_with($this->file('media')?->getMimeType() ?? '', 'video/');+ }}