public static TmpFileData AddToTemp(FileBytes bts, string key) { using (var sc = Shell.GetScope()) { var _uploadHandler = sc.ServiceProvider.GetRequiredService <IUploadedFilesHandler>(); return(_uploadHandler.AddToTemp(bts, key)); } }
public static bool TryDownloadFile(string url, out FileBytes bytes) { try { bytes = DownloadFile(url); return(true); } catch { bytes = null; return(false); } }