Class CoreUploadOptions
Global server-side defaults for CoreUpload. These values are applied by the endpoint, middleware, provider, and Tag Helper integrations unless overridden per uploader.
Inherited Members
Namespace: CoreUpload.Configuration
Assembly: CoreUpload.dll
Syntax
public class CoreUploadOptions
Properties
AllowedExtensions
Gets or sets the allowed file extensions, including the leading dot. An empty array allows any extension.
Declaration
public string[] AllowedExtensions { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
AllowedMimeTypes
Gets or sets the allowed MIME types for server-side validation. An empty array allows any MIME type.
Declaration
public string[] AllowedMimeTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
ChunkSizeBytes
Gets or sets the default chunk size in bytes for chunked uploads.
Declaration
public int ChunkSizeBytes { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
EnableAntiforgery
Gets or sets a value indicating whether the generated upload endpoints require ASP.NET Core antiforgery validation.
Declaration
public bool EnableAntiforgery { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
EnableInstantUpload
Gets or sets a value indicating whether instant uploads (content
dedupe) are enabled. When true, the server computes a
SHA-256 of every stored upload and exposes GET /exists?hash=&size=
so the client's instantUpload option can skip transferring
content the server already holds. Off by default, for two reasons: the
probe reveals whether a given content hash exists on this server, and a
confirmed hit returns the stored file's GUID — which in the default
capability model also grants /info, /download and DELETE on that file.
The probe runs the standard IUploadAuthorizationHandler
per-file check before confirming, so register a handler (or add your own
auth on the endpoint group) to scope dedupe per user or tenant. The
server hashes content itself — client-claimed hashes are never trusted.
Declaration
public bool EnableInstantUpload { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
EnableResume
Gets or sets a value indicating whether resumable uploads are enabled by default.
Declaration
public bool EnableResume { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
LicenseFile
Gets or sets the explicit path to the coreupload.lic license file.
If null, CoreUpload searches the standard locations under the application root.
Declaration
public string? LicenseFile { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MaxFileSizeBytes
Gets or sets the maximum allowed file size in bytes. Use a value less than or equal to zero to disable the limit.
Declaration
public long MaxFileSizeBytes { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
MaxFilesPerUpload
Gets or sets the maximum number of files accepted by the multiple-upload endpoint in a single request. Use a value less than or equal to zero to disable the limit.
Declaration
public int MaxFilesPerUpload { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
RequireSignedCloudSessions
Requires direct-to-cloud presign calls after create to carry the
server-issued session token, and makes the server-bound object key and upload id
take precedence over anything the client sends.
Off by default so existing signer implementations and clients keep working
unchanged. Turn it on. With it off, a caller can pass any object key to
/s3/sign, /complete or /abort - which means choosing where in
your bucket the object lands, and acting on uploads it did not start.
Declaration
public bool RequireSignedCloudSessions { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
RoutePrefix
Gets or sets the route prefix used by MapCoreUploadEndpoints().
Declaration
public string RoutePrefix { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TempDirectory
Gets or sets the temporary storage directory used for uploaded files and chunk sessions. Relative paths are resolved from the application content root.
Declaration
public string TempDirectory { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TempFileExpiry
Gets or sets how long temporary uploads and chunk sessions are kept before background cleanup removes them.
Declaration
public TimeSpan TempFileExpiry { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
VerboseErrors
When true, endpoint error responses include the raw exception message. Default false: exception detail (signer endpoints, bucket names, server paths) is logged with a correlation id and the client receives only that id. Turn on in development for easier debugging.
Declaration
public bool VerboseErrors { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |