Configures Orchard Core 4.0 temporary file storage: ITempDirectoryProvider, tenant-scoped directories, Azure Files/AWS EFS/SMB/NFS mounts, multi-instance TUS resumable uploads, and ITusTempStore blob/S3 stores.
Ships in orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an Orchard Core expert. Generate configuration and code for Orchard Core's shared temporary file storage.
ITempDirectoryProvider (namespace OrchardCore.FileStorage, package OrchardCore.Infrastructure.Abstractions): in-progress media chunked uploads, TUS resumable uploads, deployment and recipe import/export archives (local and remote), workflow type import/export, recipes written to disk before tenant setup (tenant API recipe uploads), PDF text extraction for media indexing, and ClamAV buffering of non-seekable uploads.Path set, the default DefaultTempDirectoryProvider stores files under {Path}/{TenantName}/.... The tenant sub-directory is added automatically; never compose it yourself. Tenants cannot see or collide with each other's files.OrchardCore:TempDirectory:Path (bound to TempDirectoryOptions). When it is omitted, the provider uses OrchardCore/Temp under Environment.SpecialFolder.LocalApplicationData ({LocalApplicationData}/OrchardCore/Temp/{TenantName}), without a warning; that per-user folder must be private to the app identity.Directory.CreateTempSubdirectory("OrchardCore-") under Path.GetTempPath() and logs a warning with its path. That path changes when the provider is recreated, so configure Path when temporary files must survive tenant restarts or be shared by instances./tmp/{TenantName}, C:\Windows\Temp), which another local user could pre-create to read or replace files such as an imported Recipe.json.700).Path at a mounted file share (local disk, SAN/NAS, Azure Files over SMB, AWS EFS/FSx over NFS), never at object storage. Consumers need seekable local files (Seek/SetLength, ZipFile.ExtractToDirectory, PhysicalFileProvider).TusUploads sub-directory of the same location. MediaOptions.TusTempPath was removed.TemporaryFileLifetime purge runs against the configured path.ITempDirectoryProvider instead of calling Path.GetTempPath().FileCreationService (see orchardcore-file-upload-security) before storing them permanently.sealed modifier, except View Models.{
"OrchardCore": {
"TempDirectory": {
"Path": "/mnt/shared/octemp"
}
}
}
OrchardCore__TempDirectory__Path=/mnt/shared/octemp
The setting is global; every tenant gets its own sub-directory beneath it.
Mount the share at the operating system or platform level, then set Path to the mount point.
# Linux or containers, Azure Files over SMB
sudo mkdir -p /mnt/octemp
sudo mount -t cifs //<account>.file.core.windows.net/<share> /mnt/octemp \
-o vers=3.0,username=<account>,password=<storage-key>,dir_mode=0777,file_mode=0777,serverino,nosharesock,actimeo=30
# Windows
New-SmbGlobalMapping -RemotePath "\\<account>.file.core.windows.net\<share>" -Credential $cred -Persistent $true -LocalPath Z:
{ "OrchardCore": { "TempDirectory": { "Path": "Z:\\octemp" } } }
AzureFile volume. Set Path to the mount path, for example /mounts/octemp. The platform manages the credentials and reconnection.DefaultTempDirectoryProvider uses plain System.IO, so any storage presented as a mounted filesystem path (local disk, SAN/NAS, SMB, NFS) works without code changes.With OrchardCore.Media.Tus, every chunk of an upload must reach storage that all instances share. Choose one:
OrchardCore:TempDirectory:Path to a shared file share.OrchardCore.Media.Azure.Storage) or Amazon Media Storage (OrchardCore.Media.AmazonS3) together with OrchardCore.Media.Tus. Their startups replace ITusTempStore with AzureBlobTusTempStore or S3TusTempStore, so TUS partials go to object storage. Other temporary files still use Path.Docker Compose with a shared volume:
services:
cms:
image: my-orchard-site
environment:
OrchardCore__TempDirectory__Path: /app/data/temp
volumes:
- octemp:/app/data/temp
volumes:
octemp:
# Use an NFS, Azure Files, or EFS backed volume driver for multiple instances.
| Member | Returns |
|---|---|
GetRootDirectory() | The tenant-scoped root directory, created on demand. Use it as a base for tools that need a directory, such as the deployment TemporaryFileBuilder (OrchardCore.Deployment.Core). |
GetTempFileName(string extension = null) | A unique file path (not created; the root directory is). The extension may include or omit the leading dot. |
CreateTempSubdirectory(string prefix = null) | A newly created unique sub-directory, optionally prefixed, for extracting archives or a PhysicalFileProvider. |
using System.IO.Compression;
using Microsoft.AspNetCore.Http;
using OrchardCore.FileStorage;
namespace MyModule.Services;
public sealed class PackageImportService
{
private readonly ITempDirectoryProvider _tempDirectoryProvider;
public PackageImportService(ITempDirectoryProvider tempDirectoryProvider)
{
_tempDirectoryProvider = tempDirectoryProvider;
}
public async Task ImportAsync(IFormFile package, CancellationToken cancellationToken)
{
var archivePath = _tempDirectoryProvider.GetTempFileName(Path.GetExtension(package.FileName));
var extractPath = _tempDirectoryProvider.CreateTempSubdirectory("import-");
try
{
await using (var stream = File.Create(archivePath))
{
await package.CopyToAsync(stream, cancellationToken);
}
ZipFile.ExtractToDirectory(archivePath, extractPath);
// Process the extracted files.
}
finally
{
File.Delete(archivePath);
Directory.Delete(extractPath, recursive: true);
}
}
}
The provider only hands out paths. Create, write, and delete the files yourself; nothing tracks or expires them.
DefaultTempDirectoryProvider is registered per tenant with TryAddSingleton. A replacement must still return real, seekable local filesystem paths that support directory enumeration, so there is no blob or S3 implementation.
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using OrchardCore.FileStorage;
using OrchardCore.Modules;
namespace MyModule;
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
// ScratchVolumeTempDirectoryProvider is your own ITempDirectoryProvider implementation.
services.Replace(ServiceDescriptor.Singleton<ITempDirectoryProvider, ScratchVolumeTempDirectoryProvider>());
}
}
Path.GetTempPath(), and TUS used MediaOptions.TusTempPath.OrchardCore:TempDirectory:Path once for all consumers and remove any TusTempPath configuration. TUS partials move to {Path}/{TenantName}/TusUploads.Path.GetTempPath() and Path.GetTempFileName() calls in custom modules with ITempDirectoryProvider.Path, temporary files no longer go to Path.GetTempPath()/{TenantName} but to {LocalApplicationData}/OrchardCore/Temp/{TenantName} (or a random system temp subdirectory, with a logged warning). Grant the app identity a loaded user profile, or set Path, on hosts such as IIS app pools without a profile.| Symptom | Check |
|---|---|
| Disk full during concurrent large uploads | Move Path to a larger volume. |
| TUS upload fails when load-balanced | Use a shared Path, sticky sessions, or a blob/S3 ITusTempStore. |
| Deployment import fails on a blob-mounted path | Object storage cannot provide seekable files; use Azure Files or EFS/FSx. |
| Permission denied creating temp files | Grant the app identity write access to the mount. |
| Warning about a unique temporary directory at startup | Local application data is unavailable to the app identity; set OrchardCore:TempDirectory:Path. |
Official Orchard Core videos shown on the documentation page:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/orchardcore:orchardcore-temp-file-storagefrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcore140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard./orchardcore-admin-edit-viewsSkill for writing Orchard Core admin editor views with the ocat CSS classes and cards. Covers Edit views for content parts and fields, field editor variants, part, field and site settings editors, Fields.Edit views, admin pages rendering Model.Editor built with IDisplayManager, the ocat classes and their layout rules, label associations and group captions, part and field wrapper classes, validation, hints and the Hint_Admin shape, cards declared in placement and the Card and CardContainer shapes, split editor shapes, tabs and columns, the edit page action bar, the horizontal form layout, and the UI text casing standard. Use this skill when requests mention Orchard Core admin edit views, admin forms, grouping fields in cards, Edit.cshtml, Fields.Edit.cshtml, Settings.Edit.cshtml, ocat classes, label casing, or field hints. Strong matches include ocat-wrapper, ocat-card, Hint_Admin, PlacementLocationBuilder, IDisplayManager, ContentPartDisplayDriver, SiteDisplayDriver./orchardcore-admin-listsSkill for Orchard Core 4.0 admin index views (list pages) rendered with the AdminList shape. Covers the List and Grid layouts, AdminListContext of TModel, the admin-list and admin-list-column tag helpers, column width and alignment, row display drivers placing shapes for SummaryAdmin and SummaryAdminGrid, row templates and zones, AdminListActions Buttons and Menu layouts, AdminListToolbar, AdminListSearch, the list-management script for select-all and bulk actions, IAdminListColumnsProvider, AdminListOptions, user layout selection, per-list alternates, sortable lists, and upgrading overridden list views. Use this skill when requests mention Orchard Core admin index views, an admin index page, admin lists, converting a hand-written admin listing, grid layout, list columns, row actions menu, or adding a column to the content items list. Strong matches include OrchardCore.Admin.Abstractions, AdminListContext, AdminListColumn, IAdminListColumnsProvider, AdminListOptions, AdminListLayout, ContentsAdminList./orchardcore-admin-menuSkill for creating admin menus in Orchard Core. Covers admin menu content, the link, placeholder, content types, and lists admin node types, the AdminMenu recipe and deployment step, ManageAdminMenu, ViewAdminMenuAll and per-menu ViewAdminMenu permissions from AdminMenuPermissions, custom admin nodes with AdminNode, IAdminNodeNavigationBuilder and AddAdminNode, data localization of node text, rendering in the 4.0 TheAdmin menu, and upgrading from the removed legacy admin menu layout. Use this skill when requests mention Orchard Core Admin Menu, Create and Manage Admin Menus, Admin Menu Deployment Recipe Step, Built-In Admin Node Types, Custom Admin Node Class, LegacyAdminMenuNavigation, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminMenu, OrchardCore.AdminMenu.Abstractions, AdminMenuPermissions, LinkAdminNode, PlaceholderAdminNode, OrchardCore.Lists, OrchardCore.Navigation./orchardcore-admin-schemesSkill for the Orchard Core 4.0 TheAdmin redesign and its admin schemes. Covers scheme records with their four colors, typography, density, corners, horizontal form layout and content width, Design > Themes > Schemes, the default scheme, the per-user scheme picker and its cookie, the seven built-in schemes, the AdminSchemes recipe step and Admin Schemes deployment step, the schemes.css stylesheet, the --ta-* design tokens, ta-content-fluid, dark mode utilities and nested color modes, TheOldAdmin and how to switch to it, and the breaking changes for custom admin themes and Layout overrides. Use this skill when requests mention admin schemes, admin colors, rebranding TheAdmin, dark mode of the admin, the admin content width, the horizontal form layout, TheOldAdmin, or upgrading a custom admin theme to the new TheAdmin. Strong matches include AdminScheme, AdminSchemes, DefaultSchemeId, HorizontalFormLayout, ContentWidth, data-ta-scheme, --ta-primary, ta-content-fluid, TheOldAdmin, and OrchardCore.Themes.TheAdmin.Other plugins' skills for the same job