Jump to: navigation, search

Difference between revisions of "File Upload Size Restriction"


(Created page with "{{UnderConstructionStart}} == File Upload Size Restriction == '''Overview''' This feature introduces a configurable file upload size restriction. Its purpose is to prevent u...")
 
(File Upload Size Restriction)
Line 8: Line 8:
 
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.
 
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.
+
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 ===
 
=== User Feedback ===
  
When an oversized file is detected:
+
When an over-sized file is detected:
  
 
* The user immediately receives a notification.
 
* The user immediately receives a notification.
Line 47: Line 45:
  
 
* The configured upload limit (MB)
 
* The configured upload limit (MB)
 +
<br>
 +
Example usage:
 +
<source lang="xml">Text="{Binding DocumentViewModel.FileNotUploadedReason}"</source>
 +
 
<br>
 
<br>
 
==== 2. MaxUploadSizeMB ====
 
==== 2. MaxUploadSizeMB ====
  
 
A double representing the maximum allowed file size in megabytes.
 
A double representing the maximum allowed file size in megabytes.
This allows UI elements to display helpful contextual information directly—e.g., in dialogs, item details, or editors.
+
This allows UI elements to display helpful contextual information directly.
  
 
Example usage:
 
Example usage:

Revision as of 10:40, 26 November 2025

Wiki Under Construction Start.PNG

File Upload Size Restriction

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

New 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 human-readable explanation of why the file was not uploaded.
It includes:

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


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.

Example usage:

Text="{Binding DocumentViewModel.MaxUploadSizeMB}"


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

Wiki Under Construction End.PNG