Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): accept PDF, ZIP, and other file uploads up to 50MB #8235

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 7 commits intomain fromrefs/pull/8235/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 38 changed files with 155 additions and 5 deletions (loading 35).

x
0 of 38 viewed, 38 left
3 additions and 1 deletionapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -1040,7 +1040,9 @@
const isUser = message.role === "user";
const styles = isUser ? markdownStyles.user : markdownStyles.assistant;
const timestampLabel = formatMessageTime(isUser ? message.createdAt : message.updatedAt);
- const attachments = message.attachments ?? [];
+ const attachments = (message.attachments ?? []).filter(
+ (attachment) => attachment.type === "image",
+ );
const hasReviewCommentContext = message.text.includes("<review_comment");
// A bubble that sizes itself from its content cannot lay out a block whose
// intrinsic width overflows `maxWidth`: Android positions the bubble's
30 additions and 4 deletionsapps/server/src/assets/AssetAccess.tsModified
View file
@@ -37,7 +37,7 @@
timingSafeEqualBase64Url,
} from "../auth/utils.ts";
import * as ServerSecretStore from "../auth/ServerSecretStore.ts";
-import { resolveAttachmentPathById } from "../attachmentStore.ts";
+import { parseAttachmentFileExtension, resolveAttachmentPathById } from "../attachmentStore.ts";
import * as ServerConfig from "../config.ts";
import * as ProjectFaviconResolver from "../project/ProjectFaviconResolver.ts";
import * as WorkspacePaths from "../workspace/WorkspacePaths.ts";
@@ -79,6 +79,13 @@
version: Schema.Literal(1),
kind: Schema.Literal("attachment"),
attachmentId: Schema.String,
+ /** Decided at mint time. Absent tokens (from before this field) serve