Class FileHelper
- Espace de noms
- SecureExchangesSDK.Helpers
- Assembly
- SecureExchangesSDK.NetCore.dll
This is the Helper need to be use for upload and download files to Secure Exchanges. This Helper will decrypt the files, and encrypt them
public class FileHelper
- Héritage
-
FileHelper
- Membres hérités
- Extension Methods
Methods
DownloadSecureFiles(SecureFiles, List<DownloadedFileWithMetaData>)
public void DownloadSecureFiles(SecureFiles filesMetaData, List<DownloadedFileWithMetaData> files)
Paramètres
filesMetaDataSecureFilesfilesList<DownloadedFileWithMetaData>
DownloadSecureFiles(SecureFiles, string, object)
public void DownloadSecureFiles(SecureFiles filesMetaData, string savingDirectory, object paramsToFile = null)
Paramètres
filesMetaDataSecureFilessavingDirectorystringparamsToFileobject
GetExtensionsByMimeType(string)
Return a list of extensions based on the mimeType
public static string[] GetExtensionsByMimeType(string mimeType)
Paramètres
mimeTypestring
Retour
- string[]
GetMimeType(string)
Get the mime type of an extension
public static string GetMimeType(string fileNameOrExtension)
Paramètres
fileNameOrExtensionstringExtension, with the (.)
Retour
- string
return the mime type of the extension
GetNumberOfChunk(long)
public static double GetNumberOfChunk(long totalBytes)
Paramètres
totalByteslong
Retour
GetTextSize(long)
That will return in text the Size of a file
public static string GetTextSize(long bytes)
Paramètres
byteslong
Retour
PrepareFileToDownload(FileMetaData, string, object)
public DownloadedFileWithMetaData PrepareFileToDownload(FileMetaData fileMetaData, string savingDirectory, object paramsToFile = null)
Paramètres
fileMetaDataFileMetaDatasavingDirectorystringparamsToFileobject
Retour
PrepareFileToDownload(SecureFiles, string, object)
public List<DownloadedFileWithMetaData> PrepareFileToDownload(SecureFiles filesMetaData, string savingDirectory, object paramsToFiles = null)
Paramètres
filesMetaDataSecureFilessavingDirectorystringparamsToFilesobject
Retour
UploadLargeFiles(ILocalFile, HandShake, Guid, int)
public List<UploadFiles> UploadLargeFiles(ILocalFile args, HandShake handShake, Guid rep, int maxDegreeOfParallelism = 6)
Paramètres
argsILocalFilehandShakeHandShakerepGuidmaxDegreeOfParallelismint
Retour
Events
Before_UploadChunksErrorRetry
public event FileHelper.BeforeUploadChunksErrorRetry Before_UploadChunksErrorRetry
Event Type
DowloadChuckFinish_Event
public event FileHelper.DownloadChuckFinishEvent DowloadChuckFinish_Event
Event Type
DownloadChuckStart_Event
public event FileHelper.DownloadChuckStart DownloadChuckStart_Event
Event Type
DownloadChunkErorr_Event
public event FileHelper.DownloadChunkError DownloadChunkErorr_Event
Event Type
DownloadFileError_event
public event FileHelper.DownloadFileError DownloadFileError_event
Event Type
DownloadFinish_event
public event FileHelper.DownloadFinish DownloadFinish_event
Event Type
DownloadStart_event
public event FileHelper.DownloadStart DownloadStart_event
Event Type
DownloadsFinish_event
public event FileHelper.DownloadsFinish DownloadsFinish_event
Event Type
DownloadsStart_event
public event FileHelper.DownloadsStart DownloadsStart_event
Event Type
GetFileSizeBeforeUpload
public static event FileHelper.GetFileSizeToUpload GetFileSizeBeforeUpload
Event Type
UploadChunkCompleted_Event
public event FileHelper.UploadChunkCompleted UploadChunkCompleted_Event
Event Type
UploadChunkError_Event
public event FileHelper.UploadChunkError UploadChunkError_Event
Event Type
UploadEvent
public static event FileHelper.UploadProgress UploadEvent
Event Type
UploadFileEnd_Event
public event FileHelper.UploadFileDelegate UploadFileEnd_Event
Event Type
UploadFileStart_Event
public event FileHelper.UploadFileDelegate UploadFileStart_Event
Event Type
UploadFinishFiles_Event
public event FileHelper.UploadFinishFiles UploadFinishFiles_Event
Event Type
UploadFinish_Event
public event FileHelper.UploadFinish UploadFinish_Event