Test

Merged
SW
4mo ago
+500-0

Summary by cubic

Adds POST /api/connectors/files to stage an image (by public URL) into Composio storage and return a { name, mimetype, s3key } descriptor for use in file_uploadable connector actions (e.g., LinkedIn/X post images).

  • New Features
    • POST /api/connectors/files: accepts { url, toolSlug }, uploads via Composio, and returns { success, name, mimetype, s3key }.
    • Auth required via x-api-key or Authorization: Bearer; no account_id is used.
    • Derives toolkitSlug from the action toolSlug to scope the upload correctly.
    • Status codes: 200 on success; 400 for invalid/malformed body; 401 for unauthenticated; 502 when the upstream fetch/store fails.

Summary by CodeRabbit

  • New Features
    • Added API endpoint for uploading connector files via URL
    • Supports CORS requests and requires authentication
    • Performs comprehensive request validation on upload parameters
    • Returns uploaded file metadata and detailed error responses