mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 11:15:00 +00:00
fix: allow agent workspace directories in media local roots (#17136)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 7545ef1e19
Co-authored-by: MisterGuy420 <255743668+MisterGuy420@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
@@ -4,8 +4,12 @@ import { saveMediaBuffer } from "./store.js";
|
||||
export async function resolveOutboundAttachmentFromUrl(
|
||||
mediaUrl: string,
|
||||
maxBytes: number,
|
||||
options?: { localRoots?: readonly string[] },
|
||||
): Promise<{ path: string; contentType?: string }> {
|
||||
const media = await loadWebMedia(mediaUrl, maxBytes);
|
||||
const media = await loadWebMedia(mediaUrl, {
|
||||
maxBytes,
|
||||
localRoots: options?.localRoots,
|
||||
});
|
||||
const saved = await saveMediaBuffer(
|
||||
media.buffer,
|
||||
media.contentType ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user