feat(graphql): support video uploads

This commit is contained in:
Peter Steinberger
2025-12-26 15:27:35 +01:00
parent 3be2e3ae7e
commit 0bf7190c95
5 changed files with 33 additions and 25 deletions
+1 -6
View File
@@ -387,11 +387,6 @@ export class TwitterClient {
const category = this.mediaCategoryForMime(input.mimeType);
if (!category) return { success: false, error: `Unsupported media type: ${input.mimeType}` };
// Keep scope small: images/gif first. Video requires longer processing + larger chunks.
if (input.mimeType.startsWith('video/')) {
return { success: false, error: 'Video uploads are not supported via GraphQL yet (use Sweetistics)' };
}
try {
const initParams = new URLSearchParams({
command: 'INIT',
@@ -501,7 +496,7 @@ export class TwitterClient {
}
}
if (input.alt) {
if (input.alt && input.mimeType.startsWith('image/')) {
const metaResp = await this.fetchWithTimeout(TWITTER_MEDIA_METADATA_URL, {
method: 'POST',
headers: this.getJsonHeaders(),