Jump to: navigation, search

Difference between revisions of "File Upload Size Restriction"


(File Upload Size Restriction)
 
Line 1: Line 1:
== File Upload Size Restriction ==
 
 
 
'''Overview'''
 
'''Overview'''
  
Line 70: Line 68:
 
How and where these values are displayed is entirely up to the UI customizer.
 
How and where these values are displayed is entirely up to the UI customizer.
  
 +
[[Category:Client|File Upload Size Restriction]]
 +
[[Category:Mobile|File Upload Size Restriction]]
 +
[[Category:Version 5.1|File Upload Size Restriction]]
 +
[[Category:WinX|File Upload Size Restriction]]
  
 
= Availability =
 
= Availability =

Latest revision as of 09:23, 27 November 2025

Overview

This feature introduces a configurable file upload size restriction. Its purpose is to prevent users from attempting to upload excessively large files (for example, a 100 MB file) when a much smaller upload limit is enforced.

Previously, when a file exceeded the allowed limit, the system would repeatedly attempt to upload it. Since the upload could never succeed, this resulted in an internal retry loop. The user received no feedback, leaving them confused and unaware of why their changes were not being fully committed.

The new FileUploadSizeRestriction mechanism resolves this issue by enforcing a maximum allowed file size before any upload attempt is performed. When a file exceeds this configured limit, the system immediately stops the upload and provides clear user feedback.

User Feedback

When an over-sized file is detected:

  • The user immediately receives a notification.


The notification includes:

  • The actual size of the selected file.
  • The configured maximum size allowed for uploads.


This ensures that the user knows exactly:

  • What went wrong
  • How large their file currently is
  • What the maximum allowed file size is


Notification FileUploadSizeRestriction.png

ViewModel Properties

To provide additional flexibility and UI customization, two new properties are available for UI developers and Customizer implementations.

1. FileNotUploadedReason

A string containing a explanation of why the file was not uploaded.
It includes:

  • The actual file size (MB, rounded to 2 decimals)
  • The configured upload limit (MB)


If no size-restriction applies or the file does not exceed the configured limit, this property returns null as its default value.

Example usage:

Text="{Binding DocumentViewModel.FileNotUploadedReason}"



2. MaxUploadSizeMB

A double representing the maximum allowed file size in megabytes.
This allows UI elements to display helpful contextual information directly.

If no size restriction is configured for the content, this property returns null as its default value.

Example usage:

Text="{Binding DocumentViewModel.MaxUploadSizeMB}"


How and where these values are displayed is entirely up to the UI customizer.

Availability

Clients Available since
Mobile Version 5.1 (Mobile)
WinX Version 5.1 (WinX)