Search Results for

Show / Hide Table of Contents

# 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.

##### Inheritance

object
CoreUploadOptions

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### 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 |

#### 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 |

#### 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 |