Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5273,6 +5273,7 @@
Gets or sets the type of file reading.
For SaveToTemporaryFolder, use <see cref="P:Microsoft.FluentUI.AspNetCore.Components.FluentInputFileEventArgs.LocalFile" /> to retrieve the file.
For Buffer, use <see cref="P:Microsoft.FluentUI.AspNetCore.Components.FluentInputFileEventArgs.Buffer" /> to retrieve bytes.
For Stream, use <see cref="P:Microsoft.FluentUI.AspNetCore.Components.FluentInputFileEventArgs.Stream"/> to have full control over retrieving the file.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentInputFile.DragDropZoneVisible">
Expand Down Expand Up @@ -8299,6 +8300,11 @@
Gets or sets the Menu status.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentProfileMenu.OpenChanged">
<summary>
Gets or sets the callback that is invoked when the open state changes.
</summary>
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentProfileMenu.TopCorner">
<summary>
Gets or sets whether popover should be forced to top right or top left (RTL).
Expand Down Expand Up @@ -8416,6 +8422,9 @@
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentProfileMenu.PersonaId">
<summary />
</member>
<member name="M:Microsoft.FluentUI.AspNetCore.Components.FluentProfileMenu.OpenChangedHandlerAsync">
<summary />
</member>
<member name="P:Microsoft.FluentUI.AspNetCore.Components.FluentProgress.Min">
<summary>
Gets or sets the minimum value.
Expand Down
14 changes: 14 additions & 0 deletions examples/Demo/Shared/Pages/InputFile/InputFilePage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<div>
<DemoSection Title="Default" Component="@typeof(InputFileDefault)">
<Description>
<p>By default this component will use the <code>SaveToTemporaryFolder</code> mode which creates a local file.</p>

<FluentMessageBar Title="Warning:" Intent="@MessageIntent.Warning" AllowDismiss="false" FadeIn="false">
This might not always be possible depending on the user rights on the host. You may need to change the <code>InputFileMode</code> depending on your use case.
</FluentMessageBar>

</Description>
</DemoSection>
Expand All @@ -41,13 +46,22 @@

<DemoSection Title="Mode = InputFileMode.Buffer" Component="@typeof(InputFileBufferMode)">
<Description>
<p>Using the <code>Buffer</code> mode will load the entire file into memory during uploading.</p>

<p>This mode is recommended when you cannot store local files and you are working small files and have enough memory.</p>

</Description>
</DemoSection>

<DemoSection Title="Mode = InputFileMode.Stream" Component="@typeof(InputFileStream)">
<Description>
<p>The <code>Stream</code> mode gives you more control of the uploading process to save memory. In order for it to work you will need to implement the handling for the stream on your own.</p>

<p>This mode is recommended when you want to upload large files which you do not want to hold entirely in memory.</p>

<FluentMessageBar Title="Warning:" Intent="@MessageIntent.Warning" AllowDismiss="false" FadeIn="false">
Remember to always dispose each stream to prevent memory leaks!
</FluentMessageBar>
</Description>
</DemoSection>

Expand Down
5 changes: 3 additions & 2 deletions src/Core/Components/InputFile/FluentInputFile.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public FluentInputFile()

/// <summary>
/// Gets or sets the maximum size of a file to be uploaded (in bytes).
/// Default value is 10 MB.
/// Default value is 10 MiB.
/// </summary>
[Parameter]
public long MaximumFileSize { get; set; } = 10 * 1024 * 1024;

/// <summary>
/// Gets or sets the sze of buffer to read bytes from uploaded file (in bytes).
/// Default value is 10 KB.
/// Default value is 10 KiB.
/// </summary>
[Parameter]
public uint BufferSize { get; set; } = 10 * 1024;
Expand All @@ -97,6 +97,7 @@ public FluentInputFile()
/// Gets or sets the type of file reading.
/// For SaveToTemporaryFolder, use <see cref="FluentInputFileEventArgs.LocalFile" /> to retrieve the file.
/// For Buffer, use <see cref="FluentInputFileEventArgs.Buffer" /> to retrieve bytes.
/// For Stream, use <see cref="FluentInputFileEventArgs.Stream"/> to have full control over retrieving the file.
/// </summary>
[Parameter]
public InputFileMode Mode { get; set; } = InputFileMode.SaveToTemporaryFolder;
Expand Down
Loading