You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redirecting the workspace to another location, as shown in the readme, doesn't work #27
The readme contains these instructions for redirecting the workspace, using ArtifactStorageOptions.WorkspacePathFormatter to override the path:
var workspaceRoot = Path.Combine(Path.GetTempPath(), "markitdown", "workspaces");
var options = new MarkItDownOptions
{
ArtifactStorage = ArtifactStorageOptions.Default with
{
WorkspacePathFormatter = name => Path.Combine(workspaceRoot, name),
DeleteOnDispose = false // keep the workspace directory after conversion
},
SegmentOptions = SegmentOptions.Default with
{
Image = SegmentOptions.Default.Image with
{
KeepArtifactDirectory = true
}
}
};
Directory.CreateDirectory(workspaceRoot);
await using var client = new MarkItDownClient(options);
await using var result = await client.ConvertAsync("policy.pdf");
However, before the call to the WorkspacePathFormatter is invoked on line 36:
Activity
wags1999 commentedon Mar 2, 2026
After source code spelunking, the right way to override the temp directory that MarkItDown uses is:
or in your Program.cs:
Would be great if the Readme pointed at these options.
edgett commentedon Mar 4, 2026
I made #28 to resolve this.
KSemenenko commentedon Apr 5, 2026
Just merged! Thanks a lot!
KSemenenko commentedon Apr 5, 2026
Please check latest version and let me know
wags1999 commentedon Apr 6, 2026
Looks great! Thanks!