@kodelyth/msteams 2026.5.42 → 2026.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/klaw.plugin.json +726 -2
- package/package.json +16 -4
- package/api.ts +0 -3
- package/channel-config-api.ts +0 -1
- package/channel-plugin-api.ts +0 -2
- package/config-api.ts +0 -4
- package/contract-api.ts +0 -4
- package/index.ts +0 -20
- package/runtime-api.ts +0 -66
- package/secret-contract-api.ts +0 -5
- package/setup-entry.ts +0 -13
- package/setup-plugin-api.ts +0 -3
- package/src/ai-entity.ts +0 -7
- package/src/approval-auth.ts +0 -44
- package/src/attachments/bot-framework.test.ts +0 -506
- package/src/attachments/bot-framework.ts +0 -348
- package/src/attachments/download.ts +0 -328
- package/src/attachments/graph.test.ts +0 -441
- package/src/attachments/graph.ts +0 -489
- package/src/attachments/html.ts +0 -122
- package/src/attachments/payload.ts +0 -14
- package/src/attachments/remote-media.test.ts +0 -187
- package/src/attachments/remote-media.ts +0 -86
- package/src/attachments/shared.test.ts +0 -547
- package/src/attachments/shared.ts +0 -655
- package/src/attachments/types.ts +0 -47
- package/src/attachments.graph.test.ts +0 -414
- package/src/attachments.helpers.test.ts +0 -245
- package/src/attachments.test-helpers.ts +0 -17
- package/src/attachments.test.ts +0 -754
- package/src/attachments.ts +0 -18
- package/src/block-streaming-config.test.ts +0 -61
- package/src/channel-api.ts +0 -1
- package/src/channel.actions.test.ts +0 -797
- package/src/channel.directory.test.ts +0 -176
- package/src/channel.message-adapter.test.ts +0 -227
- package/src/channel.runtime.ts +0 -56
- package/src/channel.setup.ts +0 -77
- package/src/channel.test.ts +0 -136
- package/src/channel.ts +0 -1176
- package/src/config-schema.ts +0 -6
- package/src/config-ui-hints.ts +0 -40
- package/src/conversation-store-fs.test.ts +0 -81
- package/src/conversation-store-fs.ts +0 -149
- package/src/conversation-store-helpers.test.ts +0 -202
- package/src/conversation-store-helpers.ts +0 -105
- package/src/conversation-store-memory.ts +0 -51
- package/src/conversation-store.shared.test.ts +0 -260
- package/src/conversation-store.ts +0 -71
- package/src/directory-live.test.ts +0 -156
- package/src/directory-live.ts +0 -111
- package/src/doctor.ts +0 -27
- package/src/errors.test.ts +0 -154
- package/src/errors.ts +0 -270
- package/src/feedback-reflection-prompt.ts +0 -117
- package/src/feedback-reflection-store.ts +0 -113
- package/src/feedback-reflection.test.ts +0 -237
- package/src/feedback-reflection.ts +0 -268
- package/src/file-consent-helpers.test.ts +0 -328
- package/src/file-consent-helpers.ts +0 -115
- package/src/file-consent-invoke.ts +0 -150
- package/src/file-consent.test.ts +0 -378
- package/src/file-consent.ts +0 -223
- package/src/graph-chat.ts +0 -36
- package/src/graph-group-management.test.ts +0 -332
- package/src/graph-group-management.ts +0 -168
- package/src/graph-members.test.ts +0 -89
- package/src/graph-members.ts +0 -48
- package/src/graph-messages.actions.test.ts +0 -253
- package/src/graph-messages.read.test.ts +0 -391
- package/src/graph-messages.search.test.ts +0 -227
- package/src/graph-messages.test-helpers.ts +0 -50
- package/src/graph-messages.ts +0 -534
- package/src/graph-teams.test.ts +0 -222
- package/src/graph-teams.ts +0 -114
- package/src/graph-thread.test.ts +0 -252
- package/src/graph-thread.ts +0 -146
- package/src/graph-upload.test.ts +0 -253
- package/src/graph-upload.ts +0 -531
- package/src/graph-users.ts +0 -29
- package/src/graph.test.ts +0 -540
- package/src/graph.ts +0 -308
- package/src/inbound.test.ts +0 -221
- package/src/inbound.ts +0 -148
- package/src/index.ts +0 -4
- package/src/media-helpers.test.ts +0 -220
- package/src/media-helpers.ts +0 -105
- package/src/mentions.test.ts +0 -254
- package/src/mentions.ts +0 -114
- package/src/messenger.test.ts +0 -961
- package/src/messenger.ts +0 -608
- package/src/monitor-handler/access.ts +0 -136
- package/src/monitor-handler/inbound-media.test.ts +0 -314
- package/src/monitor-handler/inbound-media.ts +0 -180
- package/src/monitor-handler/message-handler-mock-support.test-support.ts +0 -28
- package/src/monitor-handler/message-handler.authz.test.ts +0 -739
- package/src/monitor-handler/message-handler.dm-media.test.ts +0 -54
- package/src/monitor-handler/message-handler.test-support.ts +0 -99
- package/src/monitor-handler/message-handler.thread-parent.test.ts +0 -225
- package/src/monitor-handler/message-handler.thread-session.test.ts +0 -132
- package/src/monitor-handler/message-handler.ts +0 -1003
- package/src/monitor-handler/reaction-handler.test.ts +0 -325
- package/src/monitor-handler/reaction-handler.ts +0 -122
- package/src/monitor-handler/thread-session.ts +0 -30
- package/src/monitor-handler.adaptive-card.test.ts +0 -158
- package/src/monitor-handler.feedback-authz.test.ts +0 -357
- package/src/monitor-handler.file-consent.test.ts +0 -443
- package/src/monitor-handler.sso.test.ts +0 -576
- package/src/monitor-handler.test-helpers.ts +0 -181
- package/src/monitor-handler.ts +0 -538
- package/src/monitor-handler.types.ts +0 -27
- package/src/monitor-types.ts +0 -6
- package/src/monitor.lifecycle.test.ts +0 -457
- package/src/monitor.test.ts +0 -119
- package/src/monitor.ts +0 -476
- package/src/oauth.flow.ts +0 -77
- package/src/oauth.shared.ts +0 -37
- package/src/oauth.test.ts +0 -350
- package/src/oauth.token.ts +0 -162
- package/src/oauth.ts +0 -130
- package/src/outbound.test.ts +0 -400
- package/src/outbound.ts +0 -198
- package/src/pending-uploads-fs.test.ts +0 -261
- package/src/pending-uploads-fs.ts +0 -235
- package/src/pending-uploads.test.ts +0 -186
- package/src/pending-uploads.ts +0 -121
- package/src/policy.test.ts +0 -156
- package/src/policy.ts +0 -245
- package/src/polls-store-memory.ts +0 -32
- package/src/polls.test.ts +0 -169
- package/src/polls.ts +0 -312
- package/src/presentation.ts +0 -93
- package/src/probe.test.ts +0 -79
- package/src/probe.ts +0 -132
- package/src/reply-dispatcher.test.ts +0 -543
- package/src/reply-dispatcher.ts +0 -523
- package/src/reply-stream-controller.test.ts +0 -424
- package/src/reply-stream-controller.ts +0 -334
- package/src/resolve-allowlist.test.ts +0 -253
- package/src/resolve-allowlist.ts +0 -309
- package/src/revoked-context.ts +0 -17
- package/src/runtime.ts +0 -12
- package/src/sdk-types.ts +0 -59
- package/src/sdk.test.ts +0 -727
- package/src/sdk.ts +0 -916
- package/src/secret-contract.ts +0 -49
- package/src/secret-input.ts +0 -7
- package/src/send-context.test.ts +0 -93
- package/src/send-context.ts +0 -269
- package/src/send.test.ts +0 -588
- package/src/send.ts +0 -697
- package/src/sent-message-cache.test.ts +0 -106
- package/src/sent-message-cache.ts +0 -174
- package/src/session-route.ts +0 -40
- package/src/setup-core.ts +0 -162
- package/src/setup-surface.test.ts +0 -175
- package/src/setup-surface.ts +0 -319
- package/src/sso-token-store.test.ts +0 -74
- package/src/sso-token-store.ts +0 -166
- package/src/sso.ts +0 -300
- package/src/storage.ts +0 -25
- package/src/store-fs.ts +0 -42
- package/src/streaming-message.test.ts +0 -323
- package/src/streaming-message.ts +0 -327
- package/src/test-runtime.ts +0 -16
- package/src/thread-parent-context.test.ts +0 -224
- package/src/thread-parent-context.ts +0 -159
- package/src/token-response.ts +0 -11
- package/src/token.test.ts +0 -268
- package/src/token.ts +0 -194
- package/src/user-agent.test.ts +0 -121
- package/src/user-agent.ts +0 -53
- package/src/webhook-timeouts.ts +0 -27
- package/src/welcome-card.test.ts +0 -104
- package/src/welcome-card.ts +0 -57
- package/test-api.ts +0 -1
- package/tsconfig.json +0 -16
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
|
|
3
|
-
// Mock the runtime so we can assert whether the strict-dispatcher path
|
|
4
|
-
// (`saveRemoteMedia`) was invoked versus the new direct-fetch path added
|
|
5
|
-
// for issue #63396 (Node 24+ / undici v7 compat).
|
|
6
|
-
const runtimeSaveRemoteMediaMock = vi.fn(
|
|
7
|
-
async (
|
|
8
|
-
_params: unknown,
|
|
9
|
-
): Promise<{
|
|
10
|
-
id: string;
|
|
11
|
-
path: string;
|
|
12
|
-
size: number;
|
|
13
|
-
contentType?: string;
|
|
14
|
-
fileName?: string;
|
|
15
|
-
}> => ({
|
|
16
|
-
id: "saved",
|
|
17
|
-
path: "/tmp/saved.png",
|
|
18
|
-
size: 42,
|
|
19
|
-
contentType: "image/png",
|
|
20
|
-
}),
|
|
21
|
-
);
|
|
22
|
-
const runtimeDetectMimeMock = vi.fn(async () => "image/png");
|
|
23
|
-
const runtimeSaveMediaBufferMock = vi.fn(async (_buf: Buffer, contentType?: string) => ({
|
|
24
|
-
id: "saved",
|
|
25
|
-
path: "/tmp/saved.png",
|
|
26
|
-
size: 42,
|
|
27
|
-
contentType: contentType ?? "image/png",
|
|
28
|
-
}));
|
|
29
|
-
const saveResponseMediaMock = vi.hoisted(() =>
|
|
30
|
-
vi.fn(async (response: Response, options: { maxBytes?: number }) => {
|
|
31
|
-
if (!response.ok) {
|
|
32
|
-
const statusText = response.statusText ? ` ${response.statusText}` : "";
|
|
33
|
-
throw new Error(`HTTP ${response.status}${statusText}`);
|
|
34
|
-
}
|
|
35
|
-
const contentLength = Number(response.headers.get("content-length"));
|
|
36
|
-
if (Number.isFinite(contentLength) && options.maxBytes && contentLength > options.maxBytes) {
|
|
37
|
-
throw new Error(`content length ${contentLength} exceeds maxBytes ${options.maxBytes}`);
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
id: "saved",
|
|
41
|
-
path: "/tmp/saved.png",
|
|
42
|
-
size: 42,
|
|
43
|
-
contentType: response.headers.get("content-type") ?? "image/png",
|
|
44
|
-
};
|
|
45
|
-
}),
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
vi.mock("klaw/plugin-sdk/media-runtime", async () => ({
|
|
49
|
-
saveResponseMedia: saveResponseMediaMock,
|
|
50
|
-
}));
|
|
51
|
-
|
|
52
|
-
vi.mock("../runtime.js", () => ({
|
|
53
|
-
getMSTeamsRuntime: () => ({
|
|
54
|
-
media: { detectMime: runtimeDetectMimeMock },
|
|
55
|
-
channel: {
|
|
56
|
-
media: {
|
|
57
|
-
saveRemoteMedia: runtimeSaveRemoteMediaMock,
|
|
58
|
-
saveMediaBuffer: runtimeSaveMediaBufferMock,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
}));
|
|
63
|
-
|
|
64
|
-
import { downloadAndStoreMSTeamsRemoteMedia } from "./remote-media.js";
|
|
65
|
-
|
|
66
|
-
const PNG_BYTES = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
|
|
67
|
-
|
|
68
|
-
function jsonResponse(body: BodyInit, init?: ResponseInit): Response {
|
|
69
|
-
return new Response(body, init);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function requireFirstFetchUrl(mock: ReturnType<typeof vi.fn>): unknown {
|
|
73
|
-
const [call] = mock.mock.calls;
|
|
74
|
-
if (!call) {
|
|
75
|
-
throw new Error("expected direct fetch call");
|
|
76
|
-
}
|
|
77
|
-
return call[0];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
describe("downloadAndStoreMSTeamsRemoteMedia", () => {
|
|
81
|
-
beforeEach(() => {
|
|
82
|
-
runtimeSaveRemoteMediaMock.mockClear();
|
|
83
|
-
saveResponseMediaMock.mockClear();
|
|
84
|
-
runtimeDetectMimeMock.mockClear();
|
|
85
|
-
runtimeSaveMediaBufferMock.mockClear();
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
describe("useDirectFetch: true (Node 24+ / undici v7 path for issue #63396)", () => {
|
|
89
|
-
it("bypasses readRemoteMediaBuffer and calls the supplied fetchImpl directly", async () => {
|
|
90
|
-
// `fetchImpl` here simulates the "pre-validated hostname" contract from
|
|
91
|
-
// `safeFetchWithPolicy`: the caller has already enforced the allowlist,
|
|
92
|
-
// so the strict SSRF dispatcher is not needed.
|
|
93
|
-
const fetchImpl = vi.fn(async (_input: RequestInfo | URL, _init?: RequestInit) =>
|
|
94
|
-
jsonResponse(PNG_BYTES, { status: 200, headers: { "content-type": "image/png" } }),
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
const result = await downloadAndStoreMSTeamsRemoteMedia({
|
|
98
|
-
url: "https://graph.microsoft.com/v1.0/shares/abc/driveItem/content",
|
|
99
|
-
filePathHint: "file.png",
|
|
100
|
-
maxBytes: 1024,
|
|
101
|
-
useDirectFetch: true,
|
|
102
|
-
fetchImpl,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
expect(fetchImpl).toHaveBeenCalledTimes(1);
|
|
106
|
-
const calledUrl = requireFirstFetchUrl(fetchImpl);
|
|
107
|
-
expect(calledUrl).toBe("https://graph.microsoft.com/v1.0/shares/abc/driveItem/content");
|
|
108
|
-
expect(runtimeSaveRemoteMediaMock).not.toHaveBeenCalled();
|
|
109
|
-
expect(result.path).toBe("/tmp/saved.png");
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
it("surfaces HTTP errors as exceptions (no silent drop)", async () => {
|
|
113
|
-
const fetchImpl = vi.fn(async () => jsonResponse("nope", { status: 403 }));
|
|
114
|
-
|
|
115
|
-
await expect(
|
|
116
|
-
downloadAndStoreMSTeamsRemoteMedia({
|
|
117
|
-
url: "https://graph.microsoft.com/v1.0/shares/abc/driveItem/content",
|
|
118
|
-
filePathHint: "file.png",
|
|
119
|
-
maxBytes: 1024,
|
|
120
|
-
useDirectFetch: true,
|
|
121
|
-
fetchImpl,
|
|
122
|
-
}),
|
|
123
|
-
).rejects.toThrow(/HTTP 403/);
|
|
124
|
-
expect(runtimeSaveRemoteMediaMock).not.toHaveBeenCalled();
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
it("rejects a response whose Content-Length exceeds maxBytes", async () => {
|
|
128
|
-
const fetchImpl = vi.fn(async () =>
|
|
129
|
-
jsonResponse(PNG_BYTES, {
|
|
130
|
-
status: 200,
|
|
131
|
-
headers: { "content-length": "999999" },
|
|
132
|
-
}),
|
|
133
|
-
);
|
|
134
|
-
|
|
135
|
-
await expect(
|
|
136
|
-
downloadAndStoreMSTeamsRemoteMedia({
|
|
137
|
-
url: "https://graph.microsoft.com/v1.0/shares/abc/driveItem/content",
|
|
138
|
-
filePathHint: "file.png",
|
|
139
|
-
maxBytes: 1024,
|
|
140
|
-
useDirectFetch: true,
|
|
141
|
-
fetchImpl,
|
|
142
|
-
}),
|
|
143
|
-
).rejects.toThrow(/exceeds maxBytes/);
|
|
144
|
-
expect(runtimeSaveRemoteMediaMock).not.toHaveBeenCalled();
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it("falls back to the runtime saveRemoteMedia path when useDirectFetch is omitted", async () => {
|
|
148
|
-
// Non-SharePoint caller, no pre-validated fetchImpl: make sure the strict
|
|
149
|
-
// SSRF dispatcher path is still used.
|
|
150
|
-
runtimeSaveRemoteMediaMock.mockResolvedValueOnce({
|
|
151
|
-
id: "saved",
|
|
152
|
-
path: "/tmp/saved.png",
|
|
153
|
-
size: 42,
|
|
154
|
-
contentType: "image/png",
|
|
155
|
-
fileName: "file.png",
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
await downloadAndStoreMSTeamsRemoteMedia({
|
|
159
|
-
url: "https://tenant.sharepoint.com/file.png",
|
|
160
|
-
filePathHint: "file.png",
|
|
161
|
-
maxBytes: 1024,
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
expect(runtimeSaveRemoteMediaMock).toHaveBeenCalledTimes(1);
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it("does not use the direct path when useDirectFetch is true but fetchImpl is missing", async () => {
|
|
168
|
-
runtimeSaveRemoteMediaMock.mockResolvedValueOnce({
|
|
169
|
-
id: "saved",
|
|
170
|
-
path: "/tmp/saved.png",
|
|
171
|
-
size: 42,
|
|
172
|
-
contentType: "image/png",
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
await downloadAndStoreMSTeamsRemoteMedia({
|
|
176
|
-
url: "https://graph.microsoft.com/v1.0/shares/abc/driveItem/content",
|
|
177
|
-
filePathHint: "file.png",
|
|
178
|
-
maxBytes: 1024,
|
|
179
|
-
useDirectFetch: true,
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
// Without a fetchImpl to delegate to, we must fall back to the runtime
|
|
183
|
-
// path rather than crashing.
|
|
184
|
-
expect(runtimeSaveRemoteMediaMock).toHaveBeenCalledTimes(1);
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
});
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { saveResponseMedia, type SavedRemoteMedia } from "klaw/plugin-sdk/media-runtime";
|
|
2
|
-
import type { SsrFPolicy } from "../../runtime-api.js";
|
|
3
|
-
import { getMSTeamsRuntime } from "../runtime.js";
|
|
4
|
-
import { inferPlaceholder } from "./shared.js";
|
|
5
|
-
import type { MSTeamsInboundMedia } from "./types.js";
|
|
6
|
-
|
|
7
|
-
type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Direct fetch path used when the caller's `fetchImpl` has already validated
|
|
11
|
-
* the URL against a hostname allowlist (for example `safeFetchWithPolicy`).
|
|
12
|
-
*
|
|
13
|
-
* Bypasses the strict SSRF dispatcher on `readRemoteMediaBuffer` because:
|
|
14
|
-
* 1. The pinned undici dispatcher used by `readRemoteMediaBuffer` is incompatible
|
|
15
|
-
* with Node 24+'s built-in undici v7 (fails with "invalid onRequestStart
|
|
16
|
-
* method"), which silently breaks SharePoint/OneDrive downloads. See
|
|
17
|
-
* issue #63396.
|
|
18
|
-
* 2. SSRF protection is already enforced by the caller's `fetchImpl`
|
|
19
|
-
* (`safeFetch` validates every redirect hop against the hostname
|
|
20
|
-
* allowlist before following).
|
|
21
|
-
*/
|
|
22
|
-
async function saveRemoteMediaDirect(params: {
|
|
23
|
-
url: string;
|
|
24
|
-
filePathHint: string;
|
|
25
|
-
fetchImpl: FetchLike;
|
|
26
|
-
maxBytes: number;
|
|
27
|
-
contentTypeHint?: string;
|
|
28
|
-
originalFilename?: string;
|
|
29
|
-
}): Promise<SavedRemoteMedia> {
|
|
30
|
-
const response = await params.fetchImpl(params.url, { redirect: "follow" });
|
|
31
|
-
return await saveResponseMedia(response, {
|
|
32
|
-
sourceUrl: params.url,
|
|
33
|
-
filePathHint: params.filePathHint,
|
|
34
|
-
maxBytes: params.maxBytes,
|
|
35
|
-
fallbackContentType: params.contentTypeHint,
|
|
36
|
-
originalFilename: params.originalFilename,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export async function downloadAndStoreMSTeamsRemoteMedia(params: {
|
|
41
|
-
url: string;
|
|
42
|
-
filePathHint: string;
|
|
43
|
-
maxBytes: number;
|
|
44
|
-
fetchImpl?: FetchLike;
|
|
45
|
-
ssrfPolicy?: SsrFPolicy;
|
|
46
|
-
contentTypeHint?: string;
|
|
47
|
-
placeholder?: string;
|
|
48
|
-
preserveFilenames?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Opt into a direct fetch path that bypasses `readRemoteMediaBuffer`'s strict
|
|
51
|
-
* SSRF dispatcher. Required for SharePoint/OneDrive downloads on Node 24+
|
|
52
|
-
* (see issue #63396). Only safe when the supplied `fetchImpl` has already
|
|
53
|
-
* validated the URL against a hostname allowlist.
|
|
54
|
-
*/
|
|
55
|
-
useDirectFetch?: boolean;
|
|
56
|
-
}): Promise<MSTeamsInboundMedia> {
|
|
57
|
-
const originalFilename = params.preserveFilenames ? params.filePathHint : undefined;
|
|
58
|
-
let saved: SavedRemoteMedia;
|
|
59
|
-
if (params.useDirectFetch && params.fetchImpl) {
|
|
60
|
-
saved = await saveRemoteMediaDirect({
|
|
61
|
-
url: params.url,
|
|
62
|
-
filePathHint: params.filePathHint,
|
|
63
|
-
fetchImpl: params.fetchImpl,
|
|
64
|
-
maxBytes: params.maxBytes,
|
|
65
|
-
contentTypeHint: params.contentTypeHint,
|
|
66
|
-
originalFilename,
|
|
67
|
-
});
|
|
68
|
-
} else {
|
|
69
|
-
saved = await getMSTeamsRuntime().channel.media.saveRemoteMedia({
|
|
70
|
-
url: params.url,
|
|
71
|
-
fetchImpl: params.fetchImpl,
|
|
72
|
-
filePathHint: params.filePathHint,
|
|
73
|
-
maxBytes: params.maxBytes,
|
|
74
|
-
ssrfPolicy: params.ssrfPolicy,
|
|
75
|
-
fallbackContentType: params.contentTypeHint,
|
|
76
|
-
originalFilename,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
path: saved.path,
|
|
81
|
-
contentType: saved.contentType,
|
|
82
|
-
placeholder:
|
|
83
|
-
params.placeholder ??
|
|
84
|
-
inferPlaceholder({ contentType: saved.contentType, fileName: params.filePathHint }),
|
|
85
|
-
};
|
|
86
|
-
}
|