Exemple #1
0
        public async Task <Document> SaveDocumentAsync(Stream file, string fileName, int size, string userId)
        {
            var document = new Document(userId, fileName, size);

            await _blobStorage.CreateContainerAsync(userId);

            await _blobStorage.CreateBlobAsync(userId, document.Id, file);

            var result = await _documentRepository.CreateDocumentAsync(document, userId);

            return(result);
        }