DataJuggler.Blazor.FileUpload 5.0.1

Install-Package DataJuggler.Blazor.FileUpload -Version 5.0.1
dotnet add package DataJuggler.Blazor.FileUpload --version 5.0.1
<PackageReference Include="DataJuggler.Blazor.FileUpload" Version="5.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DataJuggler.Blazor.FileUpload --version 5.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DataJuggler.Blazor.FileUpload, 5.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DataJuggler.Blazor.FileUpload as a Cake Addin
#addin nuget:?package=DataJuggler.Blazor.FileUpload&version=5.0.1

// Install DataJuggler.Blazor.FileUpload as a Cake Tool
#tool nuget:?package=DataJuggler.Blazor.FileUpload&version=5.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

To see a live demo and to code generate C Sharp files from an Excel sheet, please visit: Blazor Excelerate https://excelerate.datajuggler.com

To download or clone the above project, the code is available here: https://github.com/DataJuggler/Blazor.Excelerate

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.1 99 11/12/2021
5.0.0 81 11/11/2021
2.0.0 72 11/11/2021
1.6.2 135 10/14/2021
1.6.1 136 10/13/2021
1.6.0 866 3/10/2021
1.5.1 827 11/30/2020
1.5.0 199 11/27/2020
1.4.1 252 11/13/2020
1.4.0 216 11/13/2020
1.3.5 12,139 4/8/2020
1.3.4 1,872 3/6/2020
1.3.3 369 2/26/2020
1.3.2 444 2/7/2020
1.3.1 278 2/7/2020
1.3.0 445 1/25/2020
1.2.8 312 1/24/2020
1.2.7 2,991 1/15/2020
1.2.6 307 1/14/2020
1.2.5 270 1/14/2020
1.2.4 312 1/13/2020
1.2.3 242 1/13/2020
1.2.2 238 1/13/2020
1.2.1 399 1/12/2020
1.2.0 398 1/12/2020
1.1.0 422 1/5/2020
1.0.11-Preview 261 12/3/2019
1.0.10-Preview 179 11/16/2019
1.0.9-Preview 154 11/12/2019
1.0.8-Preview 155 11/12/2019
1.0.7-Preview 158 11/12/2019
1.0.6-Preview 159 11/11/2019
1.0.5-Preview 164 11/11/2019

11.12.2021: I realized my ProgressVisible didn't have the Parameter tag. Testing it now.

11.11.2021: Rolling back to .Net 5.0, as .Net 6.0 works for this project, but my other projects Blazor.Excelerate
and PixelDatabase.Net stopped working. I will wait for Microsoft to fix a few bugs and try again later.
I changed the version number to 5.0 to match the Framework version.

11.10.2021: This is now a .Net 6.0 project, and upgraded to Version 2.0.0

10.14.2021
Version 1.6.2: I added a vertical-align CSS snipped to ensure custom button text is vertically aligned.

Version 1.6.1: I updated all the components to the latest versions, and I am attempting to display the ButtonText. All this time the ButtonText was being ignored. I am working on a new project that needed this so I updated.
Sorry for the delay.

Version 1.6.0: Another user provided an update to support Multiple Files. Creating the Nuget package now, so version 1.6.0 is not thoroughly tested yet.

Version 1.5.1: This version works. Sorry for the confusion during testing.

Version 1.5.0: I am trying to be somewhat consistent with my other packages. The 1 is this is still version one of this product, the 5 is .Net 5.0. This version should actually work. I tested it a little this time.

Version 1.4.1: I had a prroblem with my first attempt at .Net 5. Trying again.

Version 1.4.0: This version of for .Net 5.0. I am still using Steve Sanderson's Blazor Input File because it worked, and the new version for .Net 5.0 I can't get working yet.

Version 1.3.5: I added a Visible property to make it easier to hide the standard file input.

Version 1.3.4: I fixed an issue where the AllowedExtensions was failing if a file was named fileName.JPG or filename.PNG, since the extension is upper case.

Version 1.3.3: I added 3 new properties:
1. SaveToDisk - Defaults to True
2. Stream - If SaveToDisk is false, a memory stream is returned.
3. HasStream - This read only property returns true if the Stream exists (Stream != null);

This has only been briefly tested.

Version 1.3.2: Somehow the Parameter Tag from issue 1.3.1 wasn't there. Fixed now.

Version 1.3.1:

1. While testing I discovered some confusion between ButtonClassName and CustomButtonClassName. As used in the component, ButtonClassName was used for the Reset button only, so I renamed ButtonClassName to ResetButtomClassName.

2. CustomButtonClassName was not a Parameter, now that is fixed.

Sorry for the breaking change, but if I am confused between ButtonClassName and CustomButtonClassName, everyone probably is also, so I hope this adds some clarity.

Version 1.3.0: I think I have the use Custom button simplified, as I added a new property for ShowCustomButton,
and other properties for ButtonClassName, ButtonTextClassName and some other properties.

The samples page on GitHub now has a standard button and a custom button on the same page to show how
to do it.

Version 1.2.8: I added two new Parameter properties:
1. InputFileClassName
2. MessageClassName

These are designed to make it easier to style in real world components.

Version 1.2.7: I changed the font style for the Reset button. Testing it now.

Version 1.2.6: Apparently my 1.2.5 OnReset method isn't working, so I added a string parameter to the event
declaration. I actually tested it this time, and it seems to work with a project reference, so it should work now.

Version 1.2.5: I added an OnReset event / parameter property so that when the new Reset button is clicked,
subscribers to the event can be notified that the UI has been reset.

Possible use cases include a displayed image or attachment might need to be removed when the Reset button
is clicked.

Fix for version 1.2.4: I typed 1.3.3 for the fix for version 1.2.3. Sorry, I can type but my vision is not very good.

Fix for version 1.2.3: I created the new property UploadComplete, but I wasn't setting it to true after a
file was uploaded.

Fix for version 1.2.2: I accidently checked in with a C# comment in a .razor component and it showed up.
Oops. This is now fixed.

New Features for version 1.2.0:
I added a method 'IsImageFile', that for now returns true if the extions is .png or .jpg's only.
This method is used in conjunction with the following new parameters:

1. RequiredHeight & RequiredWidth, which if set means the uploaded file must exactly match
on height and width, else the CustomRequiredSizeMessage is shown. The CustomRequiredSizeMessage
must be set for this validation to take effect.

2. MinHeight & MinWidth, which if set means the uploaded file must be at least this many pixels
on height and width, else the CustomMinSizeMessage is shown. The CustomMinSizeMessage
must be set for this validation to take effect.

3. MaxHeight & MaxWidth, which if set means the uploaded file must be less than this many pixels
on height and width, else the CustomMaxSizeMessage is shown. The CustomMaxSizeMessage
must be set for this validation to take effect.

4. The Status property is now a public [Parameter], so you can set a variable to Status and set it from
outside the component.

5. Two new custom [Parameters] were added for int CustomId and string Tag. These values are set
on the FileUploadComponent as parameters, which can help to classify or store informaiton about
the uploaded file. These values are returned with UploadedFileInfo.

6. The code was moved to a partial class, which makes it easier to work on.

All this new code is untested, so please use with caution and report any problems, and feel free to report if
something works also.


A new Image Gallery sample and video is in the works, but I needed to upload a new version for testing first.

New features for version 1.1.0:

There is a new required parameter called UploadFolder for the constructor of the class UploadFileInfo.

A request came in for returning the FullPath as a property of the class UploadFileInfo, so I added the constructor to make sure the Upload Folder is also available.

The read only property FullPath is also new, and it returns the full file path on Disc using Path.Combine(UploadFolder, FullName);

I am building a new image gallery sample, and will post a video on YouTube later today if I can finish it.
Please visit my YouTube channel and subscribe if you haven't already.

https://www.youtube.com/channel/UCaw0joqvisKr3lYJ9Pd2vHA


Update 1.0.10-Preview: A couple of Microsoft Components that are still in preview were updated.

Update 1.0.9-Preview: I added two new properties for FilterByExtension, and AllowedExtensions.
     If FilterByExtension is true, the uploaded file's extension must be in the AllowedExtensions string.
     Example: .jpg;.png; (the delimiter really doesn't matter as the compare is a contains operator).



Update 1.0.8-Preview: When I added the check for if file.Size is greater than MaxFileSize, I forgot to check if MaxFileSize is set (greater than zero).

Update 1.0.7-Preview: I added a couple of new properties for MaxFileSize and a FileTooLargeMessage to enable you to change the default message of 'The file uploaded is too large' if you want to do so.

     I also added an Aborted property, so the client gets a signal that the upload was aborted, and the Exception is returned that might help with debugging / client validation.

Update 1.0.6-Preview: I decided to return more information about the file instead of just the name to make it actually useful.

     I also broke the FileUploaded method, but now is the time to break it before anyone starts using it. Now I return an object called UploadedFileInfo, with 6 properties.
     1. string Name
     2. string PartialGuid
     3. string readonly NameWithPartialGuid (a concatanation of name + "." + PartialGuid
     4. long Size
     5. datetime LastModified
     6. string Type


     --
     This is the first working version, that also raises the OnChange event to return the FileName of the file returned.

     I also added a partial Guid to each fileName to ensure uniqueness. You can change the length of the PartialGuid, but the component does expect the PartialGuidLengthParameter to either not be set, which defaults to 12, or atleast be above zero.

     When leaving it as the default value, the filename uploaded is named (filename.extension).partialguidstring
     Example: JohnSmithResume.sxlasdfc-lae.doc