Skip to main content
All docs
V23.2
.NET 6.0+
  • The page you are viewing does not exist in the .NET Framework 4.5.2+ platform documentation. This link will take you to the parent topic of the current section.

FileAttachmentsOptions.DefaultMaxFileSize Property

Specifies the maximum file size.

Namespace: DevExpress.ExpressApp.FileAttachments.Blazor

Assembly: DevExpress.ExpressApp.FileAttachment.Blazor.v23.2.dll

NuGet Package: DevExpress.ExpressApp.FileAttachment.Blazor

Declaration

public long DefaultMaxFileSize { get; set; }

Property Value

Type Description
Int64

The maximum file size in bytes. The default value is 4MB.

Remarks

The following example demonstrates how to specify this property:

File: MySolution.Blazor.Server\Startup.cs.

using DevExpress.ExpressApp.ApplicationBuilder;
using DevExpress.ExpressApp.Blazor.ApplicationBuilder;
using DevExpress.Persistent.BaseImpl;
// ...
public class Startup {
   // ...
    public void ConfigureServices(IServiceCollection services) {
        // ...
        services.AddXaf(Configuration, builder => {
            builder.UseApplication<MySolutionBlazorApplication>();
            builder.Modules
                // ...
                .AddFileAttachments(options => {
                    options.DefaultMaxFileSize = 2097152;
                });
            // ...
        });
        // ...
    }
}
See Also