Exemplo n.º 1
0
        protected override byte[] LoadAttach(Common.Objects.Document Document, string name)
        {
            string storage = Path.Combine(Document.Storage.MainPath, Document.StorageArea.Path);

            if (File.Exists(Path.Combine(storage, name)))
            {
                return(File.ReadAllBytes(Path.Combine(storage, name)));
            }
            else
            {
                throw new FileNotFoundException();
            }
        }
Exemplo n.º 2
0
        protected override long WriteFile(string saveFileName, Common.Objects.DocumentStorage storage, Common.Objects.DocumentStorageArea storageArea, Common.Objects.Document document, Common.Objects.DocumentContent content)
        {
            string storagePath      = Path.Combine(storage.MainPath, storageArea.Path);
            string saveFilePathName = Path.Combine(storagePath, saveFileName);

            File.WriteAllBytes(saveFilePathName, content.Blob);
            return(content.Blob.Length);
        }
Exemplo n.º 3
0
 protected override string GetFileName(Common.Objects.Document Document)
 {
     return(string.Format("{1}_{0}", Document.IdBiblos.ToString().PadLeft(8, '0'), Document.DocumentParent.IdBiblos.ToString().PadLeft(8, '0')));
 }