A Library to perform file-related operations on the .net core applications
Description
💯 By using this library and adding it to your project, you can skip writing codes for uploading file any types.
💥 By adding this package to your project, you can implement the parts related to working with files much faster.
👉 The methods and classes of this library are implemented in static and the codes are implemented executed in parallel.
PackageManager : Install-Package UploadFileExtentions -Version 2.0.0
Get Content Type
- GetContentType(string path) returns file type as string
Validation 🧛
-
IsValidFile(byte[] bytFile, FileType flType, string fileContentType) returns bool as result
-
IsValidImageFile(byte[] bytFile, string fileContentType) returns bool as result
-
IsValidVideoFile(byte[] bytFile, string fileContentType) returns bool as result
-
IsValidPdfFile(byte[] bytFile, string fileContentType) returns bool as result
-
IsValidDocDocxFile(byte[] bytFile, string fileContentType) returns bool as result
-
IsValidZipRarFile(byte[] bytFile, string fileContentType) returns bool as result
Upload and Delete Files
-
🐙 UploadFileAsync(this IFormFile file, string path,FileType type,string fileName="", bool generateNewFileName = false)
-
🐌 UploadFileBase64(this string base64,string path)
-
🐳 void(string path)
using SecureFileUploadExtention.FileSecurity;
IFormFile file=attachment; var uploadFileResult = await file.UploadFileAsync(path,FileType.Video,file.Name,true);