The UFile library facilitates the uploading and processing of large files by handling them in smaller chunks.
License
—
Deps
2
Install Size
—
Vulns
✓ 0
Published
Dec 31, 2025
$ dotnet add package UFile.PartialUploaderdotnet add package UFile.PartialUploader
public static IServiceCollection AddServices(this IServiceCollection services, IConfiguration conf)
{
// Adds the UFile service to the specified service collection.
services.AddUFile("App_Data", "tmp");
return services;
}
[Route("api/[controller]")]
[ApiController]
public class FileController : ControllerBase
{
[HttpPost("upload")]
public async Task<IActionResult> Upload()
{
var partial_uploader = new UFileHelper();
return StatusCode((int)await partial_uploader.UploadChunkFiles(Request));
}
}
npm install partial-uploader
const file = event.target.files[0];
uploadFile = (file: File) => uploadWithPartialFile("/File/upload", file,
//you can add header here
{ "Authorization": `Bearer ${token}` });
let uploadResponse = await uploadFile(file);
if (uploadResponse.success)
{
// your file will be inside the folder at this location
const path = 'App_Data/tmp/' + uploadResponse.id;
}