public URespose <bool> DeleteDirectory(string Owner, string path) { try { var(token, ownerToken) = StandartHeader(Owner, ref path); return(storageManager.DeleteDirectory(token, ownerToken, path)); } catch { return(URespose.BadResponse()); } }
public URespose <bool> IsExistFile(string Owner, string path) { try { var(token, ownerToken) = StandartHeader(Owner, ref path); return(storageManager.IsExistFile(token, ownerToken, path)); } catch { return(URespose.BadResponse()); } }
public URespose RemoveDocumentOverlay(string Owner, string path, int Page) { try { var(token, ownerToken) = StandartHeader(Owner, ref path); storageManager.SetDocumentOverlayContent(token, ownerToken, path, Page, null); return(URespose.GoodResponse()); } catch { return(URespose.BadResponse()); } }
public URespose SetDocumentOverlay(string Owner, string path, int Page, IFormFile Content) { try { var(token, ownerToken) = StandartHeader(Owner, ref path); using (var sm = Content.OpenReadStream()) storageManager.SetDocumentOverlayContent(token, ownerToken, path, Page, sm); return(URespose.GoodResponse()); } catch { return(URespose.BadResponse()); } }
public URespose LoadFile(string Owner, string path, IFormFile uploadedFile) { try { var(token, ownerToken) = StandartHeader(Owner, ref path); if (storageManager.CreateFile(token, ownerToken, path, uploadedFile.OpenReadStream())) { return(URespose.GoodResponse()); } return(URespose.BadResponse()); } catch { return(URespose.BadResponse()); } }
public UCustomRespose <FileStreamResult> GetDocumentOverlay(string Owner, string path, int Page) { try { var(token, ownerToken) = StandartHeader(Owner, ref path); var stream = storageManager.GetDocumentOverlayContent(token, ownerToken, path, Page); if (stream == null) { return(URespose.BadResponse()); } var fResult = File(stream, "application/octet-stream"); return(UCustomRespose <FileStreamResult> .Create(fResult)); } catch { return(URespose.BadResponse()); } }
public URespose <DirectoryContent> DirectoryContent(string Owner, string path) { try { var(token, ownerToken) = StandartHeader(Owner, ref path); var directoryDescription = storageManager .GetDirectoryInfo(token, ownerToken, path ?? ""); var content = new DirectoryContent { Files = directoryDescription.Files.ToList(), Documents = directoryDescription.Documents.ToList(), Directories = directoryDescription.Directories.ToList() }; return(content); } catch { return(URespose.BadResponse()); } }