Esempio n. 1
0
        public List <UploadedDocument> UploadFilesFor(ExtensionRequest extensionRequest, List <IFormFile> formFiles)
        {
            var uploadedObjects   = _cloudStorageService.UploadFormFiles(formFiles);
            var uploadedDocuments = new List <UploadedDocument>();

            foreach (var file in uploadedObjects)
            {
                uploadedDocuments.Add(new UploadedDocument
                {
                    CloudId          = file.Id,
                    Bucket           = file.Bucket,
                    MediaLink        = file.MediaLink,
                    Name             = file.Name,
                    ExtensionRequest = extensionRequest,
                    UploadedBy       = extensionRequest.StudentCreatedBy
                });
            }

            return(uploadedDocuments);
        }